Actual result: High CPU usage, CPU temperature rises.
Details
This is caused by VS Code’s file watcher trying to watch files in common/temp/pnpm-store. Unlike node_modules, VS Code does not exclude this path by default, and thus attempts to watch every single file. In our project, this causes 79,000+ files to be watched, resulting in high CPU usage.
By adding this to .vscode/settings.json, the problem is resolved.
Summary
I noticed that my CPU usage is unusually high whenever I open a Rush project inside VS Code without doing anything.
Repro steps
Open a Rush project in VS Code.
Expected result: CPU usage shouldn’t significantly increase (e.g. consistently above 100%).
Actual result: High CPU usage, CPU temperature rises.
Details
This is caused by VS Code’s file watcher trying to watch files in
common/temp/pnpm-store
. Unlikenode_modules
, VS Code does not exclude this path by default, and thus attempts to watch every single file. In our project, this causes 79,000+ files to be watched, resulting in high CPU usage.By adding this to
.vscode/settings.json
, the problem is resolved.Maybe
rush init
should add the above configuration when generating a new project.Standard questions
Please answer these questions to help us investigate your issue more quickly:
@microsoft/rush
globally installed version?rushVersion
from rush.json?useWorkspaces
from rush.json?node -v
)?