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

Do not activate Python before opening nb #6201

Merged
merged 1 commit into from
Jun 8, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions src/client/datascience/notebook/notebookControllerManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,6 @@ export class NotebookControllerManager implements INotebookControllerManager, IE

// Be aware of if we need to re-look for kernels on extension change
this.extensions.onDidChange(this.onDidChangeExtensions, this, this.disposables);

if (this.isLocalLaunch) {
// Pre-warm fetching local kernels, for remote connections fetch as and when needed.
this.getNotebookControllers().catch(traceError);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how this slows things down? Is it the python extension activation?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it feels like we need to do this so that running a cell doesn't take forever. I'm wondering how this slows down the open as it should be a promise that's going to at least going to go off and look on disk for kernelspecs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes,
This causes pyton extension actiavtion, hence slows down extenison host and opening of the notebook.
We alraedy have code that gets this information after we get the notebook opened event.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

t should be a promise that's going to at least going to go off and look on disk for kern

Python extnesion spins up processes (process spawning is a sync process), all of this and other code (such as loading python extension js is synchronous), that blocks the extenssion host hence slows the current process of opening a notebook.

}
}

// Look up what NotebookController is currently selected for the given notebook document
Expand Down