Skip to content

perf(fmt): cache unsupported parser results - #239

Merged
chenjiahan merged 1 commit into
mainfrom
chenjiahan/perf-fmt-cache-unsupported-parser
Aug 8, 2026
Merged

perf(fmt): cache unsupported parser results#239
chenjiahan merged 1 commit into
mainfrom
chenjiahan/perf-fmt-cache-unsupported-parser

Conversation

@chenjiahan

Copy link
Copy Markdown
Member

This PR caches unsupported parser lookup results so repeated rs fmt runs can skip files that Prettier cannot parse. Unsupported entries are keyed by file path and final formatting options, avoid content I/O, and are filtered before worker-pool startup while existing option, plugin, and formatter-version invalidation remains intact. On the Rspack repository, warm-cache mean latency improved by 4.2% across 60 runs, while a 5,000-unsupported-file stress case improved by 45.6%.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying rstack-cli with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5df6609
Status: ✅  Deploy successful!
Preview URL: https://73cc499e.rstack-cli.pages.dev
Branch Preview URL: https://chenjiahan-perf-fmt-cache-un.rstack-cli.pages.dev

View logs

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5df6609134

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/rstack/src/fmt/worker.ts
@chenjiahan
chenjiahan merged commit 29095e9 into main Aug 8, 2026
4 checks passed
@chenjiahan
chenjiahan deleted the chenjiahan/perf-fmt-cache-unsupported-parser branch August 8, 2026 00:32
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