Skip to content

feat(benchmarks): add an SPA full-page navigation suite - #614

Merged
trueadm merged 4 commits into
mainfrom
feat/spa-navigation-bench
Aug 9, 2026
Merged

trueadm merged 4 commits into
mainfrom
feat/spa-navigation-bench

Conversation

@WebEferen

@WebEferen WebEferen commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Measures what a client-side navigation costs: tearing down one route's component tree and building the next while the app shell stays mounted. Five fixtures over one tree shape (octane in both dialects, react, solid 2.0, vue vapor), four navigations plus a 6x CPU-throttled one, so teardown and mount can be read apart instead of only in sum.

The semantic gate is fatal and asserts the shell survives every navigation and the layout survives the nested one BY NODE IDENTITY, so a framework cannot score well by skipping the work. work.mjs reads Chromium precise call coverage over both octane production bundles, which is what turns a slow navigation into a named cause rather than a number.

First run says the JSX dialect reaches the runtime de-opt renderer for the whole routed subtree: 4099 createElement, 4094 childSlot, 2046 deoptItemBody and 1023 hostElementBody calls that the .tsrx path never makes, 1.40x the block renders, 3.3x the wall clock on nav_deep and 3.5x under throttling. The gates hold .tsrx at zero de-opt calls and cap the .tsx counts so the gap cannot widen.

precise-work.mjs now accepts { name, arg } hooks alongside bare strings, because this suite drives one __navigate with a route rather than one hook per destination.

Summary

  • Adds a five-framework SPA navigation benchmark with fatal DOM identity checks and deterministic production-work ceilings.
  • Wires the suite into the unified runner and MCP tool, and adds strict typechecking for both Octane authoring dialects.

Validation

  • pnpm format:check
  • pnpm typecheck
  • pnpm test
  • targeted tests: octane-mcp-server suite; spa-navigation quick browser and work gates

Risk / follow-ups

  • Low risk: benchmark, documentation, and MCP wiring only; no Octane runtime or compiler behavior changes.

Provenance

  • An agent produced this diff (agent-authored)

Note

Low Risk
Adds benchmark fixtures and a backward-compatible optional-arg change to shared precise-work helpers; no production runtime or auth paths touched.

Overview
Adds a spa-navigation browser benchmark that times routed subtree teardown/mount while the app shell stays fixed, comparing octane-tsrx, octane-jsx, React, Solid, and Vue Vapor over the same deep-tree fixture. run.mjs drives Playwright with a fatal semantic gate (leaf counts, route replacement, shell/layout node identity on nested navigations) plus ops such as nav_deep, split teardown/mount probes, nav_nested, and 6× CPU throttling; work.mjs gates Octane production bundles via Chromium precise call coverage (renderBlock vs de-opt paths).

Wires the suite into benchmarks/bench.mjs, workspace pnpm-workspace.yaml, docs, and bench:spa-navigation:typecheck on root typecheck. Extends precise-work.mjs so hooks can be { name, arg } (parameterized __navigate(route)). Registers spa-navigation on the Octane benchmark MCP tool and adds a @octanejs/mcp-server changeset.

Reviewed by Cursor Bugbot for commit 56c347a. Bugbot is set up for automated code reviews on this repo. Configure here.

Measures what a client-side navigation costs: tearing down one route's
component tree and building the next while the app shell stays mounted. Five
fixtures over one tree shape (octane in both dialects, react, solid 2.0, vue
vapor), four navigations plus a 6x CPU-throttled one, so teardown and mount can
be read apart instead of only in sum.

The semantic gate is fatal and asserts the shell survives every navigation and
the layout survives the nested one BY NODE IDENTITY, so a framework cannot score
well by skipping the work. work.mjs reads Chromium precise call coverage over
both octane production bundles, which is what turns a slow navigation into a
named cause rather than a number.

First run says the JSX dialect reaches the runtime de-opt renderer for the whole
routed subtree: 4099 createElement, 4094 childSlot, 2046 deoptItemBody and 1023
hostElementBody calls that the .tsrx path never makes, 1.40x the block renders,
3.3x the wall clock on nav_deep and 3.5x under throttling. The gates hold .tsrx
at zero de-opt calls and cap the .tsx counts so the gap cannot widen.

precise-work.mjs now accepts { name, arg } hooks alongside bare strings, because
this suite drives one __navigate with a route rather than one hook per
destination.
@github-actions github-actions Bot added the feat PR: new feature or capability label Aug 7, 2026
@WebEferen WebEferen changed the title feat(benchmarks): add an SPA full-page navigation suite WIP: feat(benchmarks): add an SPA full-page navigation suite Aug 7, 2026
@WebEferen
WebEferen marked this pull request as draft August 7, 2026 16:11
@github-actions github-actions Bot removed the feat PR: new feature or capability label Aug 7, 2026
…ench

# Conflicts:
#	packages/hook-form/audit/react-parity.json
#	packages/octane-evals/datasets/train/user-apps-v1/manifest.jsonl
#	packages/react-map-gl/audit/react-parity.json
#	pnpm-lock.yaml
#	pnpm-workspace.yaml
@github-actions github-actions Bot added feat PR: new feature or capability agent-authored Diff or issue body substantially produced by an AI agent labels Aug 9, 2026
@trueadm trueadm changed the title WIP: feat(benchmarks): add an SPA full-page navigation suite feat(benchmarks): add an SPA full-page navigation suite Aug 9, 2026
@trueadm
trueadm marked this pull request as ready for review August 9, 2026 20:16
@trueadm
trueadm merged commit 9374c55 into main Aug 9, 2026
51 checks passed
@trueadm
trueadm deleted the feat/spa-navigation-bench branch August 9, 2026 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-authored Diff or issue body substantially produced by an AI agent feat PR: new feature or capability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants