-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Find available kernelspecs more efficiently #3136
Conversation
It's failing the test for listing kernelspecs when one is invalid, and I don't think that can easily be fixed here; I'll need to change it in jupyter_client. |
Reopening to test with jupyter_client 5.2, which was just released. |
Looks like appveyor will fail until the jupyter_client conda package makes its way through the wickets. |
Reopening to test with jupyter_client 5.2, which was just released. |
setup.py
Outdated
@@ -148,7 +148,7 @@ | |||
'ipython_genutils', | |||
'traitlets>=4.2.1', | |||
'jupyter_core>=4.4.0', | |||
'jupyter_client', | |||
'jupyter_client>=4.2.0', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5.2, since it needed that to pass the tests? Or is the invalid-spec issue separate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it probably should be 5.2.
Thanks! |
Using
find_kernel_specs()
followed byget_kernel_spec()
has quadratic performance with the number of available kernels, because it effectively rescans for each available kernel. Hands up, I designed this, and I can't think why I did it this way.I thought this was going to require some ugly workaround, but thankfully @captainsafia was on the case two years ago, adding the
get_all_specs()
method (jupyter/jupyter_client#93). So all I've done here is switch the notebook code to use it.This should improve performance loading pages for anyone with several kernels installed.
Closes gh-3135