Replies: 1 comment
There shouldn't be any difference for server component only workload. The bundler difference appears only in client/server reference handling ( Please feel free to create a benchmark. It's welcome but I don't think we'll have it inside the repo. (I'll move this to discussion but it looks like github "convert to discussion" is broken, so commenting it here) |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Related plugin
Description
Next.js 16.2 highlighted a React Server Components rendering improvement that came from changing React Flight payload parsing from a
JSON.parsereviver to a plain parse followed by a JavaScript walk. React's benchmark for the upstream change reported roughly 72–78% faster chunk deserialization, and Next.js reported 25–60% faster HTML rendering in representative applications.@vitejs/plugin-rscdelegates Flight decoding toreact-server-dom-webpack, so it should inherit the optimization when the matching React packages include it. However, this repository currently has no benchmark that shows the cost of Flight deserialization or makes a stable-versus-canary React comparison possible. The recently addedperformance-trackexample verifies React performance spans, but it intentionally tests instrumentation rather than decoder throughput.A focused benchmark would help us:
@vitejs/plugin-rscwrappers do not add a regression aroundcreateFromReadableStream();Suggested solution
Add a small RSC performance benchmark/fixture with representative payloads, for example:
For each case, measure the relevant phases separately where practical:
@vitejs/plugin-rsc/ssrand/or the browser client wrapper;The runner should warm up each case, take multiple samples, and report stable statistics such as median and p95. It should support the repository's existing
pnpm override-react <version>workflow so the same fixture can be run with matching stable and canary packages.Initially this can be an informational local or manually triggered benchmark rather than a strict CI threshold, avoiding noisy failures while establishing baselines.
This proposal is for measurement infrastructure; it should not copy React's parser into the plugin or switch users to canary packages automatically.
Alternative
Rely only on React's upstream benchmark. That proves the parser optimization itself, but it does not exercise this plugin's wrappers, vendored-version selection, or end-to-end RSC → SSR pipeline.
Additional context
"use cache"plugin #859Validations
All reactions