shell env - change to ipc invoke/handle to speed up resolution

This commit is contained in:
Benjamin Pasero
2021-04-06 15:37:42 +02:00
parent d491ec5c72
commit 92281913a1
6 changed files with 81 additions and 105 deletions
+1 -5
View File
@@ -26,10 +26,6 @@
const safeProcess = preloadGlobals.process;
const useCustomProtocol = safeProcess.sandboxed || typeof safeProcess.env['VSCODE_BROWSER_CODE_LOADING'] === 'string';
// Start to resolve process.env before anything gets load
// so that we can run loading and resolving in parallel
const whenEnvResolved = safeProcess.resolveEnv();
/**
* @typedef {import('./vs/base/parts/sandbox/common/sandboxTypes').ISandboxConfiguration} ISandboxConfiguration
*
@@ -169,7 +165,7 @@
// Wait for process environment being fully resolved
performance.mark('code/willWaitForShellEnv');
if (!safeProcess.env['VSCODE_SKIP_PROCESS_ENV_PATCHING'] /* TODO@bpasero for https://github.com/microsoft/vscode/issues/108804 */) {
await whenEnvResolved;
await safeProcess.shellEnv();
}
performance.mark('code/didWaitForShellEnv');