FG
💻 Software🛠️ Developer ToolsMicrosoft

File watcher resulting in high CPU use on Mac/Linux for large folders

Freshover 4 years ago
Mar 14, 20260 views
Confidence Score84%
84%

Problem

We are using chokidar for file watching. Chokidar is known for performing bad over large folders (see https://github.com/paulmillr/chokidar/issues/410). To investigate: - can we consume a newer version of chokidar with the scalability issue fixed - can we change our watching strategy to only watch what we need instead of always watching root - can we switch to another watching library that is more efficient Workaround: Find the large folders in your workspace and add them under the `files.watcherExclude` setting

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Moderate Confidence Fix
84% confidence100% success rate2 verificationsLast verified Mar 14, 2026

Solution: File watcher resulting in high CPU use on Mac/Linux for large folders

Low Risk

Although when `useFsEvents` is `false` (non-default option on OSX), the CPU usage becomes terrible. I'll investigate the new PR in chokidar too.

84

Trust Score

2 verifications

100% success
  1. 1

    Although when `useFsEvents` is `false` (non-default option on OSX), the CPU usag

    Although when `useFsEvents` is `false` (non-default option on OSX), the CPU usage becomes terrible.

  2. 2

    I'll investigate the new PR in chokidar too.

    I'll investigate the new PR in chokidar too.

Validation

Resolved in microsoft/vscode GitHub issue #3998. Community reactions: 1 upvotes.

Verification Summary

Worked: 2
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

vscodeideeditordebtperffile-watcher