diff --git a/news/2 Fixes/10893.md b/news/2 Fixes/10893.md new file mode 100644 index 000000000000..2c5f0d0820be --- /dev/null +++ b/news/2 Fixes/10893.md @@ -0,0 +1 @@ +Performa validation of interpreter only when a Notebook is opened instead of when extension activates. diff --git a/src/client/datascience/activation.ts b/src/client/datascience/activation.ts index 8b58c91c3853..b76a01b7ccba 100644 --- a/src/client/datascience/activation.ts +++ b/src/client/datascience/activation.ts @@ -28,8 +28,6 @@ export class Activation implements IExtensionSingleActivationService { public async activate(): Promise { this.disposables.push(this.notebookEditorProvider.onDidOpenNotebookEditor(this.onDidOpenNotebookEditor, this)); this.disposables.push(this.jupyterInterpreterService.onDidChangeInterpreter(this.onDidChangeInterpreter, this)); - // Warm up our selected interpreter for the extension - this.jupyterInterpreterService.setInitialInterpreter().ignoreErrors(); this.contextService.activate().ignoreErrors(); } @@ -37,10 +35,14 @@ export class Activation implements IExtensionSingleActivationService { this.notebookOpened = true; this.PreWarmDaemonPool().ignoreErrors(); sendTelemetryEvent(Telemetry.OpenNotebookAll); + // Warm up our selected interpreter for the extension + this.jupyterInterpreterService.setInitialInterpreter().ignoreErrors(); } private onDidChangeInterpreter() { if (this.notebookOpened) { + // Warm up our selected interpreter for the extension + this.jupyterInterpreterService.setInitialInterpreter().ignoreErrors(); this.PreWarmDaemonPool().ignoreErrors(); } }