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 initial loading improvement #129932

Closed
3 tasks
rebornix opened this issue Aug 1, 2021 · 5 comments
Closed
3 tasks

Notebook initial loading improvement #129932

rebornix opened this issue Aug 1, 2021 · 5 comments
Assignees
Labels
freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues notebook polish Cleanup and polish issue
Milestone

Comments

@rebornix
Copy link
Member

rebornix commented Aug 1, 2021

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.
@rebornix rebornix added notebook polish Cleanup and polish issue labels Aug 1, 2021
@rebornix rebornix added this to the On Deck milestone Aug 1, 2021
@rebornix rebornix added the freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues label Aug 1, 2021
@roblourens
Copy link
Member

Good idea but wouldn't we need a new activation event for this?

@rebornix
Copy link
Member Author

rebornix commented Aug 2, 2021

@roblourens my concern of introducing a new activation event is everyone will then use that one. Our activation event doesn't specific if it awaits or not.

@rebornix rebornix mentioned this issue Aug 2, 2021
11 tasks
@rebornix
Copy link
Member Author

rebornix commented Aug 2, 2021

However we don't have such a thing in activation events, we either fire and forget or awaits, there is nothing in between. Maybe we can introduce onNotebookOpen.

@rebornix
Copy link
Member Author

We now wait for the serializer to be registered on notebook file open but don't wait for other extensions to finish activation on onNotebook.

@roblourens roblourens modified the milestones: On Deck, August 2021 Aug 26, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Oct 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues notebook polish Cleanup and polish issue
Projects
None yet
Development

No branches or pull requests

3 participants
@roblourens @rebornix and others