-
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
Perf notebook start kernel #8334
Conversation
Codecov Report
@@ Coverage Diff @@
## main #8334 +/- ##
======================================
- Coverage 72% 71% -1%
======================================
Files 373 374 +1
Lines 23373 23544 +171
Branches 3589 3622 +33
======================================
+ Hits 16829 16896 +67
- Misses 5086 5186 +100
- Partials 1458 1462 +4
|
(await this.fs.localFileExists(preferredKernelFromCache.interpreter.path)) | ||
) { | ||
traceInfo(`Freferred kernel connection found in cache ${preferredKernelFromCache.id}`); | ||
return preferredKernelFromCache; |
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.
No need to search through all the kernels if we have a cached kernel that matches exactly with what's in the notebook metadata.
const uniqueItems = new Map<string, LocalKernelConnectionMetadata>(); | ||
items.forEach((item) => uniqueItems.set(item.id, item)); | ||
kernels.forEach((item) => uniqueItems.set(item.id, item)); | ||
await this.globalState.update(LocalKernelSpecConnectionsCacheKey, Array.from(uniqueItems.values())); |
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.
Cache all local kernel connections.
Par of #7849