Skip to content

perf(fmt): avoid absolute path joins in gitignore matching - #245

Merged
chenjiahan merged 1 commit into
mainfrom
chenjiahan/perf-fmt-ignore-relative-path
Aug 8, 2026
Merged

perf(fmt): avoid absolute path joins in gitignore matching#245
chenjiahan merged 1 commit into
mainfrom
chenjiahan/perf-fmt-ignore-relative-path

Conversation

@chenjiahan

Copy link
Copy Markdown
Member

Nested .gitignore matching currently rebuilds absolute directory paths for every path segment during formatter discovery. This indexes matchers by root-relative POSIX paths instead, preserving nested override semantics while avoiding repeated path.join() work. Across 50 interleaved warm-cache Rspack runs per variant, median rs fmt --check time decreased from 410.78 ms to 390.95 ms (4.83%).

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying rstack-cli with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5a0dcfb
Status: ✅  Deploy successful!
Preview URL: https://d3189d5f.rstack-cli.pages.dev
Branch Preview URL: https://chenjiahan-perf-fmt-ignore-r.rstack-cli.pages.dev

View logs

@chenjiahan
chenjiahan merged commit 6bc5d47 into main Aug 8, 2026
4 checks passed
@chenjiahan
chenjiahan deleted the chenjiahan/perf-fmt-ignore-relative-path branch August 8, 2026 06:44
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