Skip to content

perf(fmt): avoid redundant discovery ignore checks - #240

Merged
chenjiahan merged 1 commit into
mainfrom
chenjiahan/perf-fmt-discovery-ignore
Aug 7, 2026
Merged

perf(fmt): avoid redundant discovery ignore checks#240
chenjiahan merged 1 commit into
mainfrom
chenjiahan/perf-fmt-discovery-ignore

Conversation

@chenjiahan

Copy link
Copy Markdown
Member

Summary

This PR removes the redundant ignore pass after formatter discovery, since directory and glob candidates are already filtered during traversal. Explicit files are now filtered when they enter the candidate set, preserving ignorePatterns, --ignore-path, and cache-directory exclusions while keeping .gitignore traversal-only. On Rspack's 4,569 discovery candidates, the removed pass took about 1.0 ms at the median.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying rstack-cli with  Cloudflare Pages  Cloudflare Pages

Latest commit: b498140
Status: ✅  Deploy successful!
Preview URL: https://bb58ccc8.rstack-cli.pages.dev
Branch Preview URL: https://chenjiahan-perf-fmt-discover-7w4e.rstack-cli.pages.dev

View logs

@chenjiahan
chenjiahan merged commit 2005852 into main Aug 7, 2026
4 checks passed
@chenjiahan
chenjiahan deleted the chenjiahan/perf-fmt-discovery-ignore branch August 7, 2026 14:04
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