8000 TypeScript watcher consumes large amount of CPU when idle. · Issue #17506 · microsoft/TypeScript · GitHub
[go: up one dir, main page]

Skip to content
TypeScript watcher consumes large amount of CPU when idle. #17506
Closed
@MicahZoltu

Description

@MicahZoltu

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
	}
}

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0