Performance improvements to load times of extension#931
Performance improvements to load times of extension#931DonJayamanne merged 1 commit intomicrosoft:masterfrom
Conversation
| } | ||
| if (activeWorkspace.configTarget === ConfigurationTarget.Workspace) { | ||
| return !await this.isPythonPathDefined(pythonPathInConfig!.workspaceValue); | ||
| return pythonPathInConfig!.workspaceValue === undefined || pythonPathInConfig!.workspaceValue === 'python'; |
There was a problem hiding this comment.
@MikhailArkhipov
I reverted the change you made. I've added a catch in display/index.ts which would handle cases where interpreter is invalid (does not exist).
This fs check alone takes over 1.5 seconds on my Mac.
There was a problem hiding this comment.
Single file existence check? Wow.
|
|
||
| @injectable() | ||
| export class PipEnvService implements IInterpreterLocatorService { | ||
| export class PipEnvService extends CacheableLocatorService { |
There was a problem hiding this comment.
Modified to inherit CacheableLocatorService.
Something I should have picked up during code review, my fault.
There was a problem hiding this comment.
Yeah I thought about cacheable too
Codecov Report
@@ Coverage Diff @@
## master #931 +/- ##
==========================================
- Coverage 64.07% 63.99% -0.09%
==========================================
Files 260 260
Lines 12044 12020 -24
Branches 2134 2132 -2
==========================================
- Hits 7717 7692 -25
- Misses 4318 4319 +1
Partials 9 9
Continue to review full report at Codecov.
|
(improvements from ~2.5s to under 200ms)
Fixes Improve extension load time #929