Skip to content

⛔ 100% CPU on Windows when a watched file is deleted #287800

Description

Does this issue occur when all extensions are disabled?: Yes

Version: 1.108.0 (user setup)
Commit: 94e8ae2
Date: 2026-01-08T13:53:10.781Z
Electron: 39.2.7
ElectronBuildId: 12953945
Chromium: 142.0.7444.235
Node.js: 22.21.1
V8: 14.2.231.21-electron.0
OS: Windows_NT x64 10.0.26200

I wrote about it in #263718, but couldn't get the team to reopen the issue. tl;dr if a watched file is deleted, then ReadDirectoryChangesW is called in an infinite loop, causing 100% CPU. Happened several times for me.

Steps to Reproduce:

  • Open a project with .vscode\settings.json on windows
  • Open that file in notepad
  • Every time it's changed and saved in notepad, ReadDirectoryChangesW is called for the path 2 times by the utility service
  • Now remove .vscode folder
  • Change and save in notepad again, vscode utility process start calling ReadDirectoryChangesW in an infinite loop.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugIssue identified by VS Code Team member as probable bugconfirmedIssue has been confirmed by VS Code Team memberfile-watcherFile watcherfreeze-slow-crash-leakVS Code crashing, performance, freeze and memory leak issuesnodejsNodeJS support issuesupstreamIssue identified as 'upstream' component related (exists outside of VS Code)

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions