提交 0c2388a0 编写于 作者: J Johannes Rieken

perf - simplify cached data env var (enabled cached data for the extension host)

上级 d3a6a234
......@@ -19,7 +19,7 @@ loader.config({
nodeRequire: require,
nodeMain: __filename,
'vs/nls': nlsConfig,
nodeCachedDataDir: process.env['VSCODE_NODE_CACHED_DATA_DIR_' + process.pid]
nodeCachedDataDir: process.env['VSCODE_NODE_CACHED_DATA_DIR']
});
// Running in Electron
......
......@@ -90,7 +90,7 @@ function onReady() {
process.env['VSCODE_NLS_CONFIG'] = JSON.stringify(nlsConfig);
if (cachedDataDir) {
process.env['VSCODE_NODE_CACHED_DATA_DIR_' + process.pid] = cachedDataDir;
process.env['VSCODE_NODE_CACHED_DATA_DIR'] = cachedDataDir;
}
// Load main in AMD
......
......@@ -218,7 +218,7 @@ export class EnvironmentService implements IEnvironmentService {
get sharedIPCHandle(): string { return getIPCHandle(this.userDataPath, 'shared'); }
@memoize
get nodeCachedDataDir(): string { return this.isBuilt ? path.join(this.userDataPath, 'CachedData', product.commit || new Array(41).join('0')) : undefined; }
get nodeCachedDataDir(): string { return process.env['VSCODE_NODE_CACHED_DATA_DIR'] || undefined; }
get disableUpdates(): boolean { return !!this._args['disable-updates']; }
get disableCrashReporter(): boolean { return !!this._args['disable-crash-reporter']; }
......
......@@ -67,19 +67,13 @@ export function sanitizeEnvironment(env: platform.IProcessEnvironment): void {
'VSCODE_NLS_CONFIG',
'VSCODE_PORTABLE',
'VSCODE_PID',
'VSCODE_NODE_CACHED_DATA_DIR'
];
keysToRemove.forEach((key) => {
if (env[key]) {
delete env[key];
}
});
// Remove keys based on regexp
Object.keys(env).forEach(key => {
if (key.search(/^VSCODE_NODE_CACHED_DATA_DIR_\d+$/) === 0) {
delete env[key];
}
});
}
export function addTerminalEnvironmentKeys(env: platform.IProcessEnvironment, isWindows: boolean, locale?: string): void {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册