Skip to content

perf(fmt): batch config ignore matching during discovery - #398

Merged
chenjiahan merged 2 commits into
mainfrom
chenjiahan/perf-batch-config-ignore-discovery
Aug 24, 2026
Merged

perf(fmt): batch config ignore matching during discovery#398
chenjiahan merged 2 commits into
mainfrom
chenjiahan/perf-batch-config-ignore-discovery

Conversation

@chenjiahan

Copy link
Copy Markdown
Member

Summary

This PR uses the native config-ignore batch APIs during formatter discovery, avoiding one JavaScript-to-Rust call per directory entry. Entries already excluded by .gitignore, built-in directories, globs, binary detection, or cache prechecks are removed from the candidate set before native matching, while scalar matching remains available for explicit paths, stdin, and LSP.

Performance

Measured on macOS arm64 with Node.js 24.12.0 using each repository's formatter ignore configuration. Baseline and optimized runs returned identical file lists.

Project Files Warmup / runs Baseline median / p95 Optimized median / p95 Median change
Rspack 4,714 5 / 20 494.5 / 500.5 ms 443.5 / 447.6 ms -10.3%
Rstack 572 10 / 50 12.59 / 13.04 ms 11.31 / 11.64 ms -10.1%

Related Links

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 24, 2026

Copy link
Copy Markdown

Deploying rstack-cli with  Cloudflare Pages  Cloudflare Pages

Latest commit: de6695b
Status: ✅  Deploy successful!
Preview URL: https://063c87d8.rstack-cli.pages.dev
Branch Preview URL: https://chenjiahan-perf-batch-config.rstack-cli.pages.dev

View logs

@chenjiahan
chenjiahan merged commit a80c5e3 into main Aug 24, 2026
5 checks passed
@chenjiahan
chenjiahan deleted the chenjiahan/perf-batch-config-ignore-discovery branch August 24, 2026 06:17
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