-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Discovering Python interpreters takes a long time #19669
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
Comments
I think you have to change version |
Discovering some of these envs may require activating them which can take more time. Please provide the logs as mentioned in the issue template which has this information. Set Output for
|
Once Jupyter starts using proposed discovery APIs, discovering interpreters won't be auto-triggered at startup and only when the kernel/interpreter list is opened, so a lot of this problem goes away. |
Won't this mean listing interpreters will be slower? See below why i ask this.
Based on her comments, the issue is the python envs are not showing up in the list for a while. And now if we trigger the query only when the notebook is opened, then the list will be fetched even later in the process hencing slowing the discovery even further. |
Yes, but the fact that discovering interpreters is slow shouldn't matter as much as it would not block the startup of the extension. (language servers etc.) List is loaded immediately with envs founds in the previous session, and for any new envs, it can be refreshed accordingly within those 40 seconds. Loading the whole list of interpreters would be slower, agreed. |
If it will not block the extnesion, then i don't see why we should even wait like you have suggested. I.e. i think its best to tigger the search as soon as the exension loads
I.e. i don't see why we need to wait till later, that would be be slower. FYI - @IanMatthewHuff will be working on integrating this API into the Jupyter extension. |
Thing is running discovery at startup does block starting other features in the extension, because of the single threaded nature of Node. Even though it's run in background, practically it seems to occupy so much clock that other features are not started up. That is the reason for waiting until later. Particularly for the Python extension, refreshing the list when the picker is opened isn't so bad as it updates the list in place. But each extension is free to decide what's best for them. |
Thanks for the explanation, however I am aware of this (my comment was a question based on some assumptions, hence prefixed with |
I think we can continue the discussion of the API in the Jupyter repo thread (the issue you created for the adoption of the new API) |
Interesting, I think the last comment #15813 (comment) indicated it wasn't a priority so we missed to do it. cc/ @karthiknadig |
Closing in favor of #15813 where Jupyter adopts the Python API. |
Uh oh!
There was an error while loading. Please reload this page.
Type: Bug
Behaviour
Expected vs. Actual
Diagnostic data
python.languageServer
setting: DefaultOutput for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)User Settings
Extension version: 2022.13.12212101
VS Code version: Code - Insiders 1.71.0-insider (dced70b, 2022-08-10T05:17:53.560Z)
OS version: Windows_NT x64 10.0.22000
Modes:
Sandboxed: Yes
System Info
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
A/B Experiments
The text was updated successfully, but these errors were encountered: