chore(benchmarks): record Next.js (Turbopack) at 5000 routes — vinext 5.3× faster#2391
Closed
hyf0 wants to merge 2 commits into
Closed
chore(benchmarks): record Next.js (Turbopack) at 5000 routes — vinext 5.3× faster#2391hyf0 wants to merge 2 commits into
hyf0 wants to merge 2 commits into
Conversation
Adds an app-scaling knob to generate-app.mjs (--extra/--target + VINEXT_BENCH_EXTRA_ROUTES) and a vinext-only 'Production build time (5000 routes)' perf scenario that builds a generated 5000-route app via a separate benchmarks/vinext-large fixture. Purpose: catch super-linear build-time regressions (e.g. route-graph directory scanning) that are invisible at the default ~33-route app. Separate fixture keeps the headline vinext-vs-Next comparison unchanged.
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds Next.js (Turbopack) as a second implementation of the "Production build time (5000 routes)" scenario from #2388, via a new
benchmarks/nextjs-largefixture — so the dashboard records how vinext and Turbopack compare at scale, not only at the default ~33 routes.benchmarks/nextjs-large/— a Turbopack fixture mirroringbenchmarks/nextjs(same Next.js version/config), built at 5000 routes.scenarios.json— adds thenextjs-largesetup (npm install + 5000-route generate) and aNext.jsimplementation onproduction-build-large.build-time.mjs— acceptsnextjs-large(built withnext build --turbopack, likenextjs).Why
The headline dashboard compares the two at ~33 routes, where vinext builds ~31.5% faster than Turbopack. That lead is not constant — it widens with route count. Local, same machine, median of 3 clean production builds (total wall-clock):
Marginal cost per added route ≈ 3.5 ms (vinext) vs 20 ms (Turbopack). The 33-route dashboard number understates vinext's advantage for realistic app sizes; recording the 5000-route comparison surfaces it.
Cost — the tradeoff to weigh
Main-runs only. Like the default Next.js benchmark, the Turbopack side is skipped on pull requests (it runs on
main, or when its inputs change), so PR CI is unaffected. The cost is ~+100 s on eachmainperf run for the 5000-route Turbopack build. vinext's own 5000-route build (~20 s) already runs via #2388.If the signal isn't worth the
mainminutes, feel free to close this — the vinext-only 5000-route scenario from #2388 stands on its own.Same as #2388:
perf.ymldoesn't know about the new fixture. To run green it needs thebenchmarks/nextjstreatment applied tobenchmarks/nextjs-large:grant_write_paths— addbenchmarks/nextjs-largetoproject_roots, andbenchmarks/nextjs-large/{.next,node_modules}topaths.benchmarks/nextjs-large(+app/.next) to the checks.VINEXT_PERF_SKIP_IMPLEMENTATIONS=nextjs; it should also skipnextjs-large(and add it to the--implementationallowlist) so PRs don't measure it without setup. Inputs share the same Next.js version asnextjs, so the same fingerprint / fork-PR guard applies.