-
Notifications
You must be signed in to change notification settings - Fork 290
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
Improve kernel finder caching #11156
Conversation
Updated the branch to reflect the discussions @DonJayamanne and I had offline about moving the kernel detection/finder to push model. The new workflow of kernel detection would be
With this new workflow, the only asynchronous part is the initial cache loading. Once we have the cache in memory, it's each contributed kernel finder's responsibility to update the cache per environment change. The main |
Codecov Report
@@ Coverage Diff @@
## main #11156 +/- ##
=======================================
Coverage 63% 63%
=======================================
Files 476 476
Lines 33880 33915 +35
Branches 5488 5495 +7
=======================================
+ Hits 21360 21558 +198
+ Misses 10474 10295 -179
- Partials 2046 2062 +16
|
@DonJayamanne with the changes in this PR, we now have push model / event based
This PR reduces redundant kernel research for irrelevant events, but it didn't try to make the cache update in each individual contributed kernel finder search operations minimal. For example, the Local Kernel Finder will trigger research when conda/python interpreter changes, but they might not be necessary for local kernel specs. Besides, we didn't do a diff between newly found kernels and old ones to reduce the events we broadcast. These can be improved in the coming debt week or along with the adoption of the new Python API. I'll leave the the decision to you @DonJayamanne when we should merge this PR, and feel free to push changes directly to the branch. |
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.
Looks good, just got on issue with a possible race condition causing the kernel list to be empty
This reverts commit d1e6ad4.
Re #10832. This is still on-going and require offline discussion with Don.
package-lock.json
has been regenerated by runningnpm install
(if dependencies have changed).