Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

notebook open optimizations #13488

Merged
merged 8 commits into from
Mar 28, 2024
Prev Previous commit
Next Next commit
remove measurement
Signed-off-by: Jonah Iden <jonah.iden@typefox.io>
  • Loading branch information
jonah-iden committed Mar 19, 2024
commit 0544deb99dbddc48883b462ba8fcaac25576bed1
3 changes: 0 additions & 3 deletions packages/notebook/src/browser/service/notebook-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ export class NotebookService implements Disposable {
}

async createNotebookModel(data: NotebookData, viewType: string, resource: Resource): Promise<NotebookModel> {
const start = Date.now();
const serializer = this.notebookProviders.get(viewType)?.serializer;
if (!serializer) {
throw new Error('no notebook serializer for ' + viewType);
Expand All @@ -116,10 +115,8 @@ export class NotebookService implements Disposable {
this.notebookModels.set(resource.uri.toString(), model);
// Resolve cell text models right after creating the notebook model
// This ensures that all text models are available in the plugin host
// model.cells.map(e => e.resolveTextModel());
this.textModelService.createTextModelsForNotebook(model);
this.didAddNotebookDocumentEmitter.fire(model);
console.log(`Created notebook model in ${Date.now() - start}ms`);
return model;
}

Expand Down