Skip to content

perf(fmt): reuse config options resolver - #210

Merged
chenjiahan merged 1 commit into
mainfrom
chenjiahan/perf-fmt-config-options-resolver
Aug 6, 2026
Merged

perf(fmt): reuse config options resolver#210
chenjiahan merged 1 commit into
mainfrom
chenjiahan/perf-fmt-config-options-resolver

Conversation

@chenjiahan

Copy link
Copy Markdown
Member

Formatter overrides currently resolve every file path relative to the config root with path.relative. This PR creates one config options resolver per discovery run and reuses the shared root-path resolver across all files, while preserving the no-overrides and outside-root behavior.

On rsbuild with one override, path.relative calls drop from 3,317 to 2 and discovery improves by about 6.1%; the no-overrides path remains unchanged.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying rstack-cli with  Cloudflare Pages  Cloudflare Pages

Latest commit: e39ffa6
Status: ✅  Deploy successful!
Preview URL: https://acfe8ec6.rstack-cli.pages.dev
Branch Preview URL: https://chenjiahan-perf-fmt-config-o.rstack-cli.pages.dev

View logs

@chenjiahan
chenjiahan merged commit 0e8f7b3 into main Aug 6, 2026
4 checks passed
@chenjiahan
chenjiahan deleted the chenjiahan/perf-fmt-config-options-resolver branch August 6, 2026 02:49
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