Skip to content

Notebook initial loading improvement #129932

Closed
@rebornix

Description

@rebornix

Currently when opening a notebook after the window is opened, we will try to activate all extensions whose activation event is onNotebook:{VIEWTYPE} synchronously, even if they are not accounted for serializing/deserializing the notebook. This caused a significant slow down of the first notebook opening.

Now that we have the ipynb serializer is part of the core, we should ensure the notebook file opening is fast and not blocked by any extension.

What happens now when opening an ipynb file with multiple notebook extensions installed, one example:

image

It spent 3 seconds in loading and activating Jupyter, Kusto and Julia extensions.

Proposal

  • Upon request of opening a notebook, activate extension which contributes the exact notebook serializer and wait for it to finish.
    • Request deserialization of the notebook resource
  • Send activation events for onNotebook:VIEWTYPE and onNotebook:*, fire and forget, no await.
  • Cell output render module should activate notebook extensions which contributes the impure notebook renderer prior to rendering the output.

Metadata

Metadata

Labels

freeze-slow-crash-leakVS Code crashing, performance, freeze and memory leak issuesnotebookpolishCleanup and polish issue

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions