Notebook Performance Improvements to Cell Editing/Output Changes/Execution Count Changes (#6867)

* edit perf

* Save multiline source in notebooks

* More merges

* Single, multi line works needs work

* Works with single + multi and recomputes active

* Actual perf improvements this time

* code cleanup

* Calculating output position on the fly

* Hmm can we use brackets to make this simpler?

* monday progress

* output working. lots of improvements.

* First tests working

* 10 tests now, fixed bugs

* Cleanup, add output test

* More fixes

* Need to still fix execution count bug

* Tests pass, added comments

* Cleanup

* PR comments round 1

* Deal with merge issues from master, layering

* Deleting duplicate file

* More PR Comments

* PR Comments
This commit is contained in:
Chris LaFreniere
2019-08-26 10:17:58 -07:00
committed by GitHub
parent 4afa282ef9
commit 84b3e876d7
19 changed files with 1157 additions and 73 deletions

View File

@@ -99,7 +99,7 @@ export interface INotebookService {
* sent to listeners that can act on the point-in-time notebook state
* @param notebookUri the URI identifying a notebook
*/
serializeNotebookStateChange(notebookUri: URI, changeType: NotebookChangeType): void;
serializeNotebookStateChange(notebookUri: URI, changeType: NotebookChangeType, cell?: ICellModel): void;
/**
*

View File

@@ -30,7 +30,7 @@ import { NotebookEditor } from 'sql/workbench/parts/notebook/browser/notebookEdi
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { registerNotebookThemes } from 'sql/workbench/parts/notebook/browser/notebookStyles';
import { IQueryManagementService } from 'sql/platform/query/common/queryManagement';
import { notebookConstants } from 'sql/workbench/parts/notebook/common/models/modelInterfaces';
import { notebookConstants, ICellModel } from 'sql/workbench/parts/notebook/common/models/modelInterfaces';
import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle';
import { SqlNotebookProvider } from 'sql/workbench/services/notebook/common/sql/sqlNotebookProvider';
import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService';
@@ -578,7 +578,7 @@ export class NotebookService extends Disposable implements INotebookService {
}
}
serializeNotebookStateChange(notebookUri: URI, changeType: NotebookChangeType): void {
serializeNotebookStateChange(notebookUri: URI, changeType: NotebookChangeType, cell?: ICellModel): void {
if (notebookUri.scheme !== Schemas.untitled) {
// Conditions for saving:
// 1. Not untitled. They're always trusted as we open them
@@ -598,7 +598,7 @@ export class NotebookService extends Disposable implements INotebookService {
let editor = this.findNotebookEditor(notebookUri);
if (editor && editor.model) {
editor.model.serializationStateChanged(changeType);
editor.model.serializationStateChanged(changeType, cell);
// TODO add history notification if a non-untitled notebook has a state change
}
}