chore(benchmarks): add 5000-route production-build stress scenario#2388
Closed
hyf0 wants to merge 1 commit into
Closed
chore(benchmarks): add 5000-route production-build stress scenario#2388hyf0 wants to merge 1 commit into
hyf0 wants to merge 1 commit into
Conversation
214427f to
989ed50
Compare
989ed50 to
8fe3d54
Compare
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.
8fe3d54 to
3cb128e
Compare
This was referenced Jun 28, 2026
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
benchmarks/vinext-largefixture.generate-app.mjsgains--extra <n>/--target <name>(and theVINEXT_BENCH_EXTRA_ROUTESenv) to scale and target the generated app.Why
The default benchmark app is ~33 routes. At that size, super-linear build-time effects — e.g. route-graph directory scanning that re-reads shared ancestor directories once per descendant route — are smaller than run-to-run noise, so regressions (or fixes) in them are invisible to the perf bot. 5000 is the smallest scale where such effects clearly clear the ±1.5% band while keeping CI cost moderate (a scaling sweep showed the relevant delta going ~noise at 1k → ~−32% at 5k → ~−52% at 10k, with signal flattening past ~5–8k).
Notes
benchmarks/vinext-largeto the workspace (lockfile updated).implementationId), so the 5000-route app is generated even on PR runs that skip Next.js via--implementation=vinext.This scenario builds a new project (
benchmarks/vinext-large) under the isolatedvinext-perf-headuser, whichperf.ymldoesn't yet know about. I've left theperf.ymlchange to whoever owns the perf workflow, since it touches the isolated-user ACL model and I couldn't exercise that path locally. To run green it needs the same treatmentbenchmarks/vinextalready gets:grant_write_paths— addbenchmarks/vinext-largetoproject_roots, andbenchmarks/vinext-large/{dist,.vite,node_modules/.vite,node_modules/.vite-temp}topaths. Without the write-ACL,vp build(run asvinext-perf-head) hitsEACCESwritingdist.benchmarks/vinext-large(+ itsapp/dist) to the directory / symlink checks, for parity.No change is needed to the trusted-manifest/harness-copy steps (they only gate
vinext/nextjs): the build reads the fixture from the target checkout and its scripts from the trusted harness.