-
Notifications
You must be signed in to change notification settings - Fork 299
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
Activation and execution of cells is slower when using Conda Run #8580
Comments
Conda is definitely slower for me (on first run). Takes almost 10 seconds to start up. |
Conda activation itself takes 10 seconds on my machine for a specific environment.
There's no way around this, although it should be cached. Sometimes it seems like it isn't. I've also proven (on my machine at least) that conda run is as fast as anything else. |
Slowdown isn't entirely getting variables though. Takes 15 seconds to get the activated environment variables in total. |
Getting activated environment variables requires the following:
None of these can go any faster than that (for the machine I'm on). So minimum is 18 seconds. We do cache it however. |
Yeah on rerun it takes 14ms to get all the same information. |
Looking at the kernel execution now. |
Kernel execution (if environment variable activation is cached) takes 5 seconds to start the process. 2 seconds to run all of the startup code for a total of 7 seconds to get to the code actually executing. The 5 seconds for launching can be broken down into:
The 2 seconds to run all the startup code might be shortened if we combined all of the startup code into one cell. |
Thanks for the breakdown. Those unavoidable items are slow :(. Kinda a bummer that our best case scenario would still have to take that hit. |
I did find a typo that may be causing the caching to be skipped for somethings (this line here should read Effectively that race always returns immediately but then the cacheInfo isn't completed so we always wait for the latestInfo promise. That should be cached on the python side though, so not sure it makes much of a difference. I'm going to try moving all of the kernel warmup code into a single execution to see if I can speed that up a little. |
Conda run seems to be very slow
conda run
is slowconda run
for all conda environments and we're running as well@rchiodo @IanMatthewHuff You might recall, that running
conda activate
on CI can cause issues specially when run in parallel.And we have code that retries the activation (basically conda isn't designed to activate multiple environments at the same time, due to some file locking issue).
Hence I believe using conda run in parallel (in python extension & then also running in jupyter) could be causing issues.
This is all hypothetical.
The text was updated successfully, but these errors were encountered: