-
Notifications
You must be signed in to change notification settings - Fork 13.3k
TypeScript watcher consumes large amount of CPU when idle. #17506
Copy link
Copy link
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue
Milestone
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
}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue