提交 693ffb4d 编写于 作者: M Matt Bierner

Default maxTsServerMemory to 3GB

上级 2a463879
......@@ -688,7 +688,7 @@
},
"typescript.tsserver.maxTsServerMemory": {
"type": "number",
"default": 0,
"default": 3072,
"description": "%configuration.tsserver.maxTsServerMemory%",
"scope": "window"
}
......
......@@ -151,10 +151,12 @@ export class TypeScriptServiceConfiguration {
}
private static readMaxTsServerMemory(configuration: vscode.WorkspaceConfiguration): number {
const memoryInMB = configuration.get<number>('typescript.tsserver.maxTsServerMemory', 0);
if (!Number.isSafeInteger(memoryInMB) || memoryInMB < 128) {
return 0;
const defaultMaxMemory = 3072;
const minimumMaxMemory = 128;
const memoryInMB = configuration.get<number>('typescript.tsserver.maxTsServerMemory', defaultMaxMemory);
if (!Number.isSafeInteger(memoryInMB)) {
return defaultMaxMemory;
}
return memoryInMB;
return Math.max(memoryInMB, minimumMaxMemory);
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册