chore(benchmarks): remove Vite 7 runner, update Next.js to 16.2.1#699
chore(benchmarks): remove Vite 7 runner, update Next.js to 16.2.1#699southpolesteve merged 2 commits intomainfrom
Conversation
commit: |
|
|
/bigbonk review |
There was a problem hiding this comment.
Review
This PR has two distinct changes bundled together:
- Benchmark cleanup — removes the
vinext-rolldownrunner (was identical tovinext), simplifies to a two-runner comparison, and bumps Next.js from 16.1.7 to 16.2.1. - Pages Router refactor — extracts ~320 lines of inline code from the generated
pages-server-entry.tsinto typed helper modules (pages-api-route.ts,pages-node-compat.ts), and delegates ISR cache helpers to the existingisr-cache.ts.
The PR title and description only mention (1). The refactor in (2) is a significant structural change that should be called out in the description for reviewers.
Benchmark cleanup
Clean and complete. All rolldown references are removed consistently from run.mjs, generate-app.mjs, .gitignore, dashboard components, worker RUNNER_MAP, CSS theme color, DB migration/constraint, and docs. The migration 0002_remove_rolldown_runner.sql correctly DELETEs existing rolldown data. No issues here.
Pages Router refactor
This is a good extraction that follows the AGENTS.md guidance about keeping generated entries thin. A few observations:
Behavioral differences (intentional improvements)
-
writeHeadnow lowercases non-set-cookie header keys — the old code stored them with original casing (resHeaders[k] = v), whilesetHeaderalready lowercased. The new code is consistent. Sincenew Headers()inend()is case-insensitive anyway, this shouldn't cause issues. -
send(Buffer)now converts toUint8Array— old code passed theBufferdirectly toResponse. The newnew Uint8Array(data)is safer for Cloudflare Workers whereBuffermay not be accepted by theResponseconstructor. -
redirect(status)with missing URL — old code passedundefinedas the Location; new code usesurl ?? "". Minor safety improvement.
These are all net improvements, but worth noting since they're behavioral changes in a "refactor."
One question on body size enforcement
In the old code, the Content-Length fast-reject returned a Response(413) directly — before the body was read at all. In the new code, parsePagesApiBody throws Error("Request body too large") which bubbles up and is caught by handlePagesApiRoute. The catch block checks error.message === "Request body too large" via string comparison:
if ((error as Error).message === "Request body too large") {
return new Response("Request body too large", { status: 413 });
}This works but is fragile — if the error message text ever changes in parsePagesApiBody, the catch won't match and it'll fall through to the generic 500 handler. Consider using a typed error class (similar to PagesApiBodyParseError) or exporting a sentinel, rather than matching on string content.
Tests
Good coverage — the new pages-api-route.test.ts covers query merging, JSON body parsing, urlencoded parsing, empty JSON bodies, Buffer sends, error reporting, and the 413 body size limit. The entry template tests correctly verify delegation rather than inline implementation details.
Minor nit
The migration comment says "The Vite 7 / Rolldown runner was identical to the Vite 8 / Rollup runner" — this has the labels swapped. Should be "The Vite 7 / Rollup runner was identical to the Vite 8 / Rolldown runner" (or however they were actually named). The current wording is confusing about which is which.
|
Review posted to PR #699. Here's a summary of the findings: The PR contains two distinct changes:
Key findings on the refactor:
|
The vinext-rolldown benchmark runner was identical to the vinext runner (both resolved to the same Vite version via catalog), producing duplicate results on the dashboard. Remove it entirely and simplify to a two-runner comparison: Next.js (Turbopack) vs vinext (Vite 8). Also bump the Next.js benchmark dependency from 16.1.7 to 16.2.1 to pick up recent performance improvements.
04ad655 to
035a69b
Compare
|
/bigbonk |
There was a problem hiding this comment.
Review
Clean removal of the vinext-rolldown benchmark runner. The diff is straightforward — all rolldown references are consistently removed from the benchmark harness, dashboard, worker, CSS, and docs. The Next.js bump to 16.2.1 and label updates look correct.
Two issues:
1. pnpm-workspace.yaml still references the deleted directory
pnpm-workspace.yaml:7 still lists benchmarks/vinext-rolldown as a workspace package:
- benchmarks/vinext-rolldownThis will cause pnpm install to warn or error since the directory no longer exists. Needs to be removed.
2. Migration comment has Vite/bundler labels swapped
examples/benchmarks/migrations/0002_remove_rolldown_runner.sql:2:
-- The Vite 7 / Rolldown runner was identical to the Vite 8 / Rollup runnerThis has the bundler names backwards. The whole point of Vite 7 was Rollup, and Vite 8 introduced Rolldown. Should be:
-- The Vite 7 / Rollup runner was identical to the Vite 8 / Rolldown runner(The previous review flagged this too.)
|
Review posted on PR #699. Two issues found:
|
|
/bigbonk review again |
There was a problem hiding this comment.
Clean PR. Both issues from prior reviews are fixed:
pnpm-workspace.yamlno longer referencesbenchmarks/vinext-rolldown- Migration comment now correctly says "Vite 7 / Rollup" and "Vite 8 / Rolldown"
Verified the removal is complete — no stale vinext_rolldown/vinextRolldown references remain outside the migration's DELETE statement. The run.mjs simplification, dashboard label updates, DB constraint update, CSS theme color removal, and doc updates are all consistent.
The Next.js bump to 16.2.1 in benchmarks/nextjs/package.json is fine. Note that the catalog next version at pnpm-workspace.yaml:48 is still 16.1.7 — that's correct since the catalog version is for the vinext shim compatibility target, not the benchmark runner.
|
Reviewed and approved PR #699. The two issues from prior reviews (stale |
Summary
vinext-rolldownbenchmark runner, which was identical to thevinextrunner (both resolved to the same Vite version viacatalog:), causing duplicate results on the dashboardChanges
Benchmark runner (
benchmarks/):vinext-rolldown/directoryrun.mjs(--skip-rolldown,hasRolldown,vinextRolldownresults)generate-app.mjscopy targets.gitignoreDashboard (
examples/benchmarks/):vinext_rolldownfrom workerRUNNER_MAPCHECKconstraint in init migration0002_remove_rolldown_runner.sqlmigration to clean existing dataDocs:
README.mdbenchmark description and Vite version notesAGENTS.mdVite 8 defaults section