Closed
Description
TypeScript Version: 2.4.2
Expected behavior:
When I am not touching any files in my project, TSC with watch: true
configured will not consume much (if any) CPU.
Actual behavior:
When I am not touching any files in my project, TSC with watch: true
configured consumes a notable amount of CPU on my laptop, enough to keep the fan on consistently.
This blog post suggests that the culprit is a recent change to polling for changes.
Notes:
I am using VSCode with the built-in TypeScript support, the default TypeScript build task and a tsconfig.json like:
{
"compilerOptions": {
"target": "es2017",
"module": "commonjs",
"sourceMap": true,
"outDir": "output",
"rootDir": "source",
"paths": {
"*": [
"./typings/*"
]
},
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"strictNullChecks": true,
"alwaysStrict": true,
"allowJs": true,
"watch": true
}
}