Skip to content

Conversation

@jdalton
Copy link
Contributor

@jdalton jdalton commented Jan 12, 2026

Prevent heap overflow in large monorepo scans by using streaming-based filtering.


Note

Improves memory efficiency of large scans by filtering during glob streaming instead of after accumulating all paths.

  • Add optional filter to globWithGitIgnore to apply early, maintain fast path when no negation/filter, and preserve negated ignore support via streaming
  • Introduce createSupportedFilesFilter and use it in getPackageFilesForScan to stream-filter supported files rather than post-filtering
  • Update CHANGELOG.md under Unreleased with the fix

Written by Cursor Bugbot for commit ee2fb52. Configure here.

jdalton and others added 2 commits January 12, 2026 13:07
Add streaming-based filtering to globWithGitIgnore to prevent heap overflow
when scanning large monorepos with 100k+ files. Instead of accumulating all
file paths and filtering afterwards, files are now filtered during streaming
which dramatically reduces memory usage.

Changes:
- Add `filter` option to globWithGitIgnore for early filtering during streaming
- Add createSupportedFilesFilter helper to create filter from supported files
- Update getPackageFilesForScan to use streaming filter

Fixes SMO-522

Ported from v1.x commit 9bbb8e8 ([SMO-522] Fix heap overflow in large monorepo scans #1026)

Co-authored-by: Mikola Lysenko <mikolalysenko@gmail.com>
Resolved conflict in CHANGELOG.md by keeping both changes:
- Changed: Updated Coana CLI to v14.12.148
- Fixed: Heap overflow prevention in large monorepo scans
@jdalton jdalton merged commit 0f0157e into main Jan 12, 2026
14 checks passed
@jdalton jdalton deleted the fix/heap-overflow-monorepo-scans branch January 12, 2026 21:48
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.

2 participants