Skip to content

perf(cache): make the file watcher respect scan filters; smarter defaults#80

Merged
dawsbot merged 1 commit into
masterfrom
perf/harden-file-cache
Jul 7, 2026
Merged

perf(cache): make the file watcher respect scan filters; smarter defaults#80
dawsbot merged 1 commit into
masterfrom
perf/harden-file-cache

Conversation

@dawsbot

@dawsbot dawsbot commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Re-opened copy of #79, which was auto-closed when its stacked base branch was deleted during the #78 merge. Full write-up in #79; summary:

  • onDidCreate now applies the same ignore / includeGlob / maxFilesCached filters as the findFiles scan (new unit-tested src/glob-match.ts), so bulk creations like npm install no longer flood the cache. Watcher handlers no longer throw before the first scan finishes.
  • Changing relativePath.includeGlob triggers a re-scan immediately.
  • relativePath.ignore defaults gain dist, build, coverage, .turbo, .cache, .venv, pycache.
  • relativePath.searchCountLimit default raised 1000 to 10000.

Testing: npm test 23/23, clean tsc compile.

🤖 Generated with Claude Code

…ults

Four hardening fixes to the file-cache settings:

- onDidCreate pushed every created file into the cache unfiltered, so a
  bulk creation like npm install flooded _fileNames with node_modules
  paths, bypassing ignore, includeGlob, and maxFilesCached. Created files
  now pass through the same filters as the findFiles scan (new pure
  glob-match module, unit-tested), respect the cap, and are skipped when
  outside the active workspace folder. Both watcher handlers also no
  longer throw if they fire before the first scan finishes.
- Changing relativePath.includeGlob now triggers a re-scan; previously it
  silently did nothing until a workspace switch or reload.
- relativePath.ignore default gains modern build-output dirs: dist,
  build, coverage, .turbo, .cache, .venv, __pycache__.
- relativePath.searchCountLimit default raised 1000 -> 10000; modern
  quick pick handles that comfortably, so most projects get the one-step
  filter picker. Stale "performance issues" wording dropped.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@dawsbot dawsbot force-pushed the perf/harden-file-cache branch from f5dfd0d to f696985 Compare July 7, 2026 04:35
@dawsbot dawsbot merged commit a12ba61 into master Jul 7, 2026
@dawsbot dawsbot deleted the perf/harden-file-cache branch July 7, 2026 04:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant