Repository navigation
feat(benchmarks): add the svg-dashboard SVG stress suite - #635
Merged
Merged
Conversation
A hand-rolled-SVG observability dashboard (no chart libraries) rendered byte-identically by octane-tsrx, react, solid, and svelte fixtures (~2,400 elements: 150-node topology with foreignObject labels, 8x5-series charts with gradient defs and SVG <a> legends, sparklines, a createElement icon layer on octane's de-opt path, and a portal tooltip overlay). Twelve timed ops cover path-d/transform churn, the value-identical diff-skip walk, per-commit overhead, SVG class-attribute churn, keyed reconcile inside <svg> with LIS moves, namespace push/pop, SVG portals, descriptor re-diffing, structural rescale, and style/spread updates. The harness md5-gates the vendored shared modules, replays the same ops module in Node and byte-compares the DOM, censuses namespaces (a wrong-namespace path renders nothing and would look faster), verifies keyed survivor identity, cross-hashes a canonical DOM serialization across all four fixtures, and bans layout reads during ops. 27 ratio guards recorded with dated notes; local baseline at 20 iterations; suite exposed through @octanejs/mcp-server (changeset included). Co-Authored-By: Claude Fable 5 <[email protected]>
domgan-oai
marked this pull request as ready for review
August 8, 2026 01:01
Regenerate lockfile-derived parity/evals records and re-append the svg-dashboard ratio guards after the js-framework DOM-metric removal (#636) and bundle side-effect guards (#637) rewrote ratios.json. Co-Authored-By: Claude Fable 5 <[email protected]>
Regenerate lockfile-derived parity/evals records after the React Compiler benchmark rollout (#639) and bundle-size reductions (#638). Co-Authored-By: Claude Fable 5 <[email protected]>
6 tasks done
…ture Follows the #639 rollout: every primary React benchmark builds through the shared benchmarks/react-compiler.mjs preset. The fixture's rows were already hand-memo'd, so the compiler shifts little; drag_nodes moved 1.50x -> 1.89x observed (react's per-frame keyed updates got faster), so its tripwire ceiling is re-curated to 2.5 with a dated note. All 27 ratio guards pass; DOM parity across the four fixtures is unchanged. Co-Authored-By: Claude Fable 5 <[email protected]>
Collaborator
Author
|
Merged
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Eager state init skews octane timings
- Changed useState(initialTopo()), useState(initialCharts()), and useState(initialUi()) to lazy initializer form useState(initialTopo), useState(initialCharts), useState(initialUi) to match the React fixture and avoid redundant allocations on every render.
Or push these changes by commenting:
@cursor push 30828c5b51
Preview (30828c5b51)
diff --git a/benchmarks/svg-dashboard/octane-tsrx/src/App.tsrx b/benchmarks/svg-dashboard/octane-tsrx/src/App.tsrx
--- a/benchmarks/svg-dashboard/octane-tsrx/src/App.tsrx
+++ b/benchmarks/svg-dashboard/octane-tsrx/src/App.tsrx
@@ -228,7 +228,7 @@
// subtrees arrive as descriptor props built by App, which only re-renders on
// topo/charts commits — so ui commits touch just these few bindings.
function Viewport({ defs, layers }: { defs: OctaneNode; layers: OctaneNode }) @{
- const [ui, setUi] = useState(initialUi());
+ const [ui, setUi] = useState(initialUi);
const overlayRef = useRef<Element | null>(null);
bindSetters({ setUi });
@@ -246,8 +246,8 @@
}
export default function App() @{
- const [topo, setTopo] = useState(initialTopo());
- const [charts, setCharts] = useState(initialCharts());
+ const [topo, setTopo] = useState(initialTopo);
+ const [charts, setCharts] = useState(initialCharts);
bindSetters({ setTopo, setCharts });
<ViewportYou can send follow-ups to the cloud agent here.
Reviewed by Cursor Bugbot for commit 2c1d892. Configure here.
…hboard fixture Bugbot: the eager useState(initialTopo()) form re-evaluates its argument on every re-render, re-slicing the snapshot row arrays inside timed topo/charts/ui commits — overhead the react fixture's lazy form never pays. Octane's useState accepts the same React-parity lazy initializer; use it in App and Viewport. Baseline re-recorded; 27/27 ratio guards and the compare gate pass (85 ops, 0 regressions). Co-Authored-By: Claude Fable 5 <[email protected]>
Regenerate the evals manifest and lockfile-derived records after the Version Packages release (#601). Co-Authored-By: Claude Fable 5 <[email protected]>
4 of 5 tasks
trueadm
added a commit
that referenced
this pull request
Oct 3, 2026
… samples Two quick CI runs of the paired, ~20 ms harness and same-runner A/B runs against the commits that set each guard decided every waiver: - Passing, waiver removed: activity reports, ssr-workerd cold_spawn_to_first_byte, svg-dashboard pan_zoom, memo-wall parent_rerender_equal_A and octane-jsx mount, spa-navigation nav_teardown and nav_mount (no Octane change since #674 on one runner). - Rebaselined: svg-dashboard icon_swap 1.2 -> 1.6, because #983's esbuild minification made React 15% faster while Octane stayed flat. - Confirmed Octane regressions, waiver kept and pointed at the fix: js-framework-reorder rotateb (1.41x per click since #639), memo-wall one_change_B (1.5x) and ctx_through_wall_B (1.44x), and svg-dashboard tooltip_swarm (1.31x since #635). - The rotateb note claimed React moves every survivor; it moves one. A new rotatef guard covers the LIS-vs-lastPlacedIndex differentiator (0.043x). Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 of 4 tasks
trueadm
added a commit
that referenced
this pull request
Oct 3, 2026
…nd re-judge them (#1646) * ci(bench): triage the weekly ratio-guard breaches so new ones show The weekly Bench job (`bench.mjs --quick --ratios`) was red with 81 ratio breaches, 4 suites that wrote no numbers and 4 harness gate failures, so a new breach was invisible. Every item is now a fix or a rebaseline. - Harness drift, fixed. Each harness had stopped producing numbers when runtime source it anchors on changed: - ssr-final-replay: a second suspended loop since 2026-09-29. - root-transactions/contracts: staged-DOM text and attribute journaling since 2026-09-15. - signal-dom-bindings: a second native style Block allocation site since 2026-09-23. - codegen-size: the server runtime's lazy streamed-signals chunk since 2026-09-16. - recursive-context: counted a pure-call annotation and trailing newlines as output growth. - Rebaselined, with numbers in each note: five cross-framework bundle-size ratios and the workerd script-size ratio. The absolute app and server-render budgets are now the ratchet. Lynx's no-worklet byte caps from 2026-08-17 are reset to measured + 32, with the background program pinned exactly. - Fix pending, with dated waivers that expire 2026-10-24, each with an owner task: - three exact counters the revived harnesses exposed (one extra closure per ssrTry, 128 live text reads per 128 unchanged compiled updates, compiled output at 1.295x its source); - Lynx create ratios and the re-entrant transport gate; - superlinear hydrate boundary preparation; - Octane Three versus R3F size and frame dispatch; - two timing regressions near the timer floor; - ten quick-mode timing guards whose samples are noise-bound; - the scoped descriptor shape change. - bench.mjs supports a guard `waiver` ({ reason, expires }). A waived breach prints and does not fail, and fails again once the date passes. HARNESS_FAILURE_ALLOWLIST now also covers a suite whose harness writes no numbers. The budget breaches (57) clear when the budget reset lands. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(benchmarks): pair and lengthen the timing samples behind waived ratio guards Twelve timing guards breached in weekly quick runs without a verdict. Their samples sat near Chromium's 100 µs clock or under two-sample noise, and each target ran its whole block minutes after the other side of its guard. - benchmarks/lib/paired.mjs: rotating per-round visit order and a ~20 ms sample calibration shared by the harnesses below. - js-framework-reorder, memo-wall, svg-dashboard, spa-navigation: every target's page stays open in one browser and each sample round visits all targets; short ops repeat until a sample takes about 20 ms (clicks, hook invocations, op batches, and summed navigation legs). - activity caught-reveal: a sample reveals several independent hidden roots in one window, with the small case revealing eight times as many roots so both cases do equal work; the cases alternate per round. - ssr-workerd: an untimed priming spawn per target, then paired cold-spawn rounds; quick mode runs six rounds instead of two. - bench.yml: a `suites` dispatch input to run selected suites. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(benchmarks): collect garbage before every timed spa-navigation leg The untimed return leg mounts a whole route, and its collection landed inside the next timed teardown: nav_teardown samples ran at 17-45% rme. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(benchmarks): re-judge the twelve waived timing guards with paired samples Two quick CI runs of the paired, ~20 ms harness and same-runner A/B runs against the commits that set each guard decided every waiver: - Passing, waiver removed: activity reports, ssr-workerd cold_spawn_to_first_byte, svg-dashboard pan_zoom, memo-wall parent_rerender_equal_A and octane-jsx mount, spa-navigation nav_teardown and nav_mount (no Octane change since #674 on one runner). - Rebaselined: svg-dashboard icon_swap 1.2 -> 1.6, because #983's esbuild minification made React 15% faster while Octane stayed flat. - Confirmed Octane regressions, waiver kept and pointed at the fix: js-framework-reorder rotateb (1.41x per click since #639), memo-wall one_change_B (1.5x) and ctx_through_wall_B (1.44x), and svg-dashboard tooltip_swarm (1.31x since #635). - The rotateb note claimed React moves every survivor; it moves one. A new rotatef guard covers the LIS-vs-lastPlacedIndex differentiator (0.043x). Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(benchmarks): rebaseline spa-navigation nav_mount to its CI baseline The 1.2 ceiling came from a local 0.94x reading. On CI runners #674 itself measures 1.15x and head 1.09-1.16x, so the ceiling left 3% of quick-mode headroom; 1.35 keeps a margin while still catching per-node mount growth. Co-Authored-By: Claude Opus 5.5 <[email protected]> * ci(bench): drop the three weekly waivers that now have fix PRs The waived guards now have owner PRs: ssr-final-replay try_closures (#1644), root-transactions equal_reads (#1643) and codegen-size gzip compiled/source (#1645). #1645 rebaselines the same codegen-size entry, so this branch no longer edits it. Co-Authored-By: Claude Opus 5.5 <[email protected]> * ci(bench): leave lynx-render to its owner fix The lynx-render transport gate failure and the create_1k/create_10k ratio breaches both trace to #885's JSON-encoded transport and now have an owner fix. Its branch re-notes those two guards, so this branch drops their waivers and the suite's allowlist entry instead of editing the same entries. Co-Authored-By: Claude Opus 5.5 <[email protected]> * ci(bench): keep harness failures unwaivable and leave descriptor shapes to their owner Waiving a suite that throws before it writes numbers would hide any crash in that suite, not only the known shape change, and skip all of its guards. The scoped-descriptor-shapes defect has an owner fix in progress. That fix re-pins the harness's expected keys, so narrowing the waiver here would edit the same assertion. HARNESS_FAILURE_ALLOWLIST is empty again, and a thrown suite failure always fails the job. Dated waivers remain only on individual ratio guards. Co-Authored-By: Claude Opus 5.5 <[email protected]> * ci(bench): leave the Three guards to their owner fixes three-renderer frame_1k_subscribers and the two three-bundle-size ratios have owner PRs (#1651, #1652) that re-note and ratchet those entries, so this branch drops their waivers instead of editing the same entries. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(benchmarks): point the four kept timing waivers at their attributed fixes rotateb and ctx_through_wall_B clear with #1655 and #1656; one_change_B's per-row remainder and tooltip_swarm's scoped-descriptor accessor reads each have their own fix task. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(benchmarks): point parent_rerender_equal_A's note at its per-commit journal fix Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
5 of 8 tasks
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.


Summary
Adds
benchmarks/svg-dashboard— the first SVG coverage in the bench system: a hand-rolled-SVG observability dashboard (no chart libraries) rendered byte-identically byoctane-tsrx,react19,solid2.0-beta, andsvelte5 fixtures (ports 5302–5305), registered in the unified runner with 27 curated ratio guards and a recorded local baseline.The app is Grafana-shaped (~2,400 elements): a 150-node topology with curved edges and foreignObject HTML labels, 8 charts × 5 keyed series with gradient defs and SVG
<a>legends, sparklines, a lucide-stylecreateElementicon layer (deliberately on octane's de-opt reconciler), and a portal tooltip overlay (SVGhas no z-index — the recharts ZIndexLayer pattern). Twelve timed ops cover path-d/transform churn, the value-identical diff-skip walk, per-commit overhead,setClassAttrchurn, keyed reconcile with LIS moves inside<svg>, namespace push/pop, SVG portals, descriptor re-diffing, structural rescale, and style-object/spread updates.Why
Octane's SVG surface (namespace-flagged templates, attribute-only class writes, foreignObject transitions,
createElementNSde-opt path, flag-3 opaque roots, portals into SVG) was covered only by correctness tests. Static SVG structure is nearly free in octane (template clone), so the costs live in updates — exactly what no suite measured.Changes
benchmarks/svg-dashboard/— 4 fixture apps + harness + README (fairness ledger included).data.js/ops.jsare vendored verbatim into every fixture and produce every DOM-bound string, so the frameworks contribute only binding/reconciliation machinery.d, transform, class, icon variant, style value, viewBox, tooltip placement, churn id order); namespace census at mount and after churn (a wrong-namespace path renders nothing and would look faster); keyed survivor identity; a canonical DOM serialization md5 that must match across all four fixtures; and a layout-read ban (getBBox/getBoundingClientRectinstrumented). Negative-tested: a one-byte shared-module drift and a sabotaged class binding both fail the run.benchmarks/bench.mjs—svg-dashboardmanifest entry;pnpm-workspace.yaml— fixture packages;benchmarks/README.md— suite-table row.benchmarks/baselines/ratios.json— 27 guards with dated notes: cross-framework tripwires (e.g.charts_tick≤1.3× react, observed 0.95×;icon_swap≤1.2× react as a de-opt cliff-width tripwire, observed 0.79×–0.81×) plus semantic controls pinningelements_full/svg_elements_full/foreignobject_html_full/defs_fullat exactly 1.0 across flavors.benchmarks/baselines/local/svg-dashboard.jsonrecorded at 20 iterations on the rebased head.packages/octane-mcp-server/src/index.js— new suite inBENCHMARK_SUITES(its test pins the list against the runner manifest), with a patch changeset.production_calls_tickfor octane via a--jitlessprecise-coverage pass (15,449 calls at introduction; hard ceiling 25k).Findings at introduction (2026-08-07)
Octane wins mount (0.82× react, 0.49× solid), per-commit overhead (
pan_zoom0.32× react), SVG portals (tooltip_swarm0.41× react), class churn (0.58× solid), and the icon de-opt flip vs react's normal path (0.81×). Guarded gaps:drag_nodes1.50× react (per-frame keyed-row walk re-evaluates de-opt icon holes),style_spread_pulse1.95× react (setSpread + per-property style diff),tick_sparse~1.85× solid (prev-guard walk vs fine-grained skip). One octane structural lesson is baked into the fixture and README: colocating the ui domain in aViewportleaf with reference-stable descriptor props tookpan_zoomfrom 17.6 ms to 0.3 ms — a follow-up chip exists to investigate whether autoMemo should bail stable-prop subtrees automatically.Reviewer notes (fairness ledger, full detail in the suite README): the icon layer maps to each ecosystem's real lucide mechanism; solid's portal and SVG-
<a>are hand-rolled because the 2.0 beta cannot express either declaratively (upstream<Portal>crash; compile-time namespace resolution); class strings are pre-joined and style values pass as strings so no flavor's coercion heuristics run;<use>uses SVG2href(still a sanitizer URL sink).Validation
pnpm format:checkpnpm typecheckpnpm test— full run was green exceptoctane-mcp-server's pinned suite list (16,866/16,867), which this PR updates; that project re-run passes 15/15. Not re-run in full after the one-line list fix or the rebase.node benchmarks/bench.mjs svg-dashboardfull runs ×3 (one re-recorded after rebasing onto perf: reuse bounded keyed-reorder scratch storage #630–perf: cache stable renderable regions and prune sync warming #634),--quick --ratios,--compare --ratios×2 — 0 regressions, 27/27 guards pass, DOM-parity hashes identical across all four fixtures; negative tests confirmed the md5 and byte-exact gates fire on sabotage;pnpm syncclean.Risk / follow-ups
Repeatregressions,createRenderEffecttwo-function form); the suite pins the store+reconcileshape that dbmon already uses.--ratiosonly).drag_nodes/style_spread_pulseguards as the improvement oracle.Provenance
agent-authored)Note
Low Risk
Benchmark-only changes plus an MCP suite list entry; no runtime or compiler code paths are modified.
Overview
Introduces
svg-dashboard, the first SVG-focused benchmark: a hand-rolled observability dashboard (~2,400 elements) implemented for octane-tsrx, react, solid, and svelte, with shareddata.js/ops.jsdriving every DOM string so timing isolates reconciliation and binding.The Playwright harness (
run.mjs) runs fatal correctness gates before any samples: shared-module MD5 checks, Node replay vs live DOM, namespace census, keyed survivor identity, cross-flavor canonical DOM parity, and a layout-read ban. Twelve timed ops stress pathdchurn, sparse diff walks, drag/pan, keyed topology churn,foreignObjectlabels, SVG portal tooltips, runtime icon swaps, and style/spread pulses.Wiring:
benchmarks/bench.mjsmanifest (ports 5302–5305), suite README, 27 ratio guards inbaselines/ratios.json, local baseline JSON, MCPBENCHMARK_SUITESentry, and a patch changeset for@octanejs/mcp-server.Reviewed by Cursor Bugbot for commit b6bdbce. Bugbot is set up for automated code reviews on this repo. Configure here.