Skip to content

Commit e6881a3

Browse files
committed
memoize PtyService.getEnvironment
This should not change through the runtime of the pty host Fixes microsoft#185379
1 parent 8bd6372 commit e6881a3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/vs/workbench/contrib/terminal/electron-sandbox/localTerminalBackend.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import { mark } from 'vs/base/common/performance';
3636
import { ILifecycleService, LifecyclePhase } from 'vs/workbench/services/lifecycle/common/lifecycle';
3737
import { DeferredPromise } from 'vs/base/common/async';
3838
import { IStatusbarService } from 'vs/workbench/services/statusbar/browser/statusbar';
39+
import { memoize } from 'vs/base/common/decorators';
3940

4041
export class LocalTerminalBackendContribution implements IWorkbenchContribution {
4142
constructor(
@@ -229,6 +230,7 @@ class LocalTerminalBackend extends BaseTerminalBackend implements ITerminalBacke
229230
return this._localPtyService.getProfiles?.(this._workspaceContextService.getWorkspace().id, profiles, defaultProfile, includeDetectedProfiles) || [];
230231
}
231232

233+
@memoize
232234
async getEnvironment(): Promise<IProcessEnvironment> {
233235
return this._proxy.getEnvironment();
234236
}

0 commit comments

Comments
 (0)