Skip to content

fix(scan): reduce memory use during directory scans - #1748

Merged
John-David Dalton (jdalton) merged 1 commit into
v1.xfrom
fix/stream-filter-glob-dedup
Nov 24, 2026
Merged

John-David Dalton (jdalton) merged 1 commit into
v1.xfrom
fix/stream-filter-glob-dedup

Conversation

@jdalton

@jdalton John-David Dalton (jdalton) commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Large directory scans no longer retain every matched path just to deduplicate before the supported-file filter runs. Filtered scans now turn off fast-glob uniqueness and deduplicate supported results as they stream, preserving results for overlapping patterns.

@cursor

cursor Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Localized change to glob streaming behavior with regression tests; no auth, security, or API surface changes.

Overview
Large monorepo scans that pass a supported-file filter (e.g. manifest discovery via globWithGitIgnore) no longer ask fast-glob to deduplicate every match before filtering. When a filter is set, unique is turned off and deduplication runs only on paths that survive the filter, using a streaming seen set.

This keeps overlapping patterns (such as **/*.json plus src/**/*) from inflating memory with unsupported files that would be dropped anyway. A focused test asserts filtered results stay deduplicated across overlapping globs.

Reviewed by Cursor Bugbot for commit fa8be3f. Configure here.

@jdalton
John-David Dalton (jdalton) force-pushed the fix/stream-filter-glob-dedup branch 3 times, most recently from 4a48bc8 to bf479d6 Compare November 23, 2026 18:14

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ✨

@jdalton
John-David Dalton (jdalton) merged commit fd52870 into v1.x Nov 24, 2026
25 checks passed
@jdalton
John-David Dalton (jdalton) deleted the fix/stream-filter-glob-dedup branch November 24, 2026 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants