Repository navigation
bench(lynx): gate the dual-thread commit wire cost against a changed-rows floor - #660
Merged
Merged
Conversation
…rows floor A point update's commit currently ships the whole tree: selecting one row in the 10,000-row cross-framework table serializes ~30,000 commands / 2.4MB — identical in size to a commit where every tenth row actually changed — because every row's re-encoded class array and both bindtap closures cross the wire on every commit. This adds the instrument that makes that cost a tracked, gateable number before any fix lands: - @octanejs/lynx gains a permanent __OCTANE_LYNX_PROFILE__-gated wire profiler (globalThis.__OCTANE_LYNX_PROF): per-thread commits, commands, serialized bytes, and pipeline-stage milliseconds. Compiled away when the define is absent. - benchmarks/lynx-table drives the krausest-style table app (mirrored operation-for-operation from the Vue Lynx unified benchmark matrix) through the real background root, transport, main-thread receiver, and host driver via real tap tokens, and reports deterministic per-operation command counts and commit bytes against the changed-rows semantic floor. - benchmarks/lynx-table/web is the Lynx-for-Web wall-clock harness: the same app for Octane and vendored ReactLynx / Vue Lynx vdom / Vue Lynx vapor reference bundles under one byte-identical Chromium page driver. - ratios.json gains 12 lynx-table guards pinned at today's measured waterline (select = 1500x the floor, update10th = 31x, storms likewise), each marked KNOWN GAP with the instruction that fixes must tighten them. CI now fails on any further regression and visibly tracks the gap itself. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SW6xKsEpmsN7rFu4K9mFM9
This was referenced Aug 9, 2026
Contributor
Author
domgan-oai
marked this pull request as ready for review
August 9, 2026 10:33
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
This was referenced Aug 10, 2026
This was referenced Aug 18, 2026
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
Octane's Lynx renderer currently loses point-update benchmarks to ReactLynx and Vue Lynx by roughly an order of magnitude at scale, and the dominant cause is measurable, deterministic, and — until now — untracked: the commit wire payload is proportional to tree size, not change size. Selecting one row in the 10,000-row cross-framework table serializes ~30,000 commands / 2,406,468 bytes (every row's freshly re-encoded
classarray plus twobindtapre-binds), identical in size to a commit where every tenth row actually changed. This PR lands the instrument that turns that gap into CI-tracked numbers before any fix does:@octanejs/lynxwire profiler (__OCTANE_LYNX_PROFILE__→globalThis.__OCTANE_LYNX_PROF): per-thread commits, commands, serialized bytes, and pipeline-stage milliseconds (self-check / dispatch / validate / prepare / apply / ack). Compiled away when the define is absent; the hot paths pay nothing.benchmarks/lynx-table— the krausest-style table app mirrored operation-for-operation from the Vue Lynx unified benchmark matrix, driven through the real background root, async transport, main-thread receiver, and host driver via real tap tokens, reporting deterministic per-operation command counts and commit bytes against a changed-rows floor (the commands a change of that size strictly implies).benchmarks/lynx-table/web— the Lynx-for-Web wall-clock harness: the same app for octane and vendored ReactLynx / Vue Lynx vdom / Vue Lynx vapor reference bundles (reference/manifest.jsonrecords provenance) under one byte-identical Chromium page driver. Host-bound medians, no ratio guards; the recorded baseline feeds a site chart in a follow-up PR.ratios.jsonguards pinned at today's measured waterline, each marked KNOWN GAP with the instruction that fixes must TIGHTEN them:Wall clock on the same host, same instrument (medians, 10k rows): select 1374ms vs vue-vdom 149 / vue-vapor 160 / react 176; update10th 1493 vs 193/152/273.
Why identity-diffing can never pass on a transported root: every object-valued prop is re-encoded through the wire clone per render, so
Object.isfails for every object-carrying host on every commit. A fix PR that makes the prop diff value-semantic (and stops re-announcing unchanged listeners) follows on top of this branch and tightens every guard above to ~1.0×.Measurement honesty rules are documented in
benchmarks/lynx-table/README.md: no octane-only bespoke workloads, every number from the same instrument that measures the references, and a cell that cannot be driven end-to-end reports "not measured", never a number from a degraded run.Validation
pnpm format:checkpnpm typecheck(rantsc -p packages/lynxclean; full workspace typecheck not run in this environment)pnpm test(targeted below; browser-dependent projects unavailable in the measurement container)packages/octane-mcp-server(suite manifest),packages/lynx/tests/runtime-compatibility.test.ts(source graphs incl. the newprofiling.ts)node benchmarks/bench.mjs --quick --ratios --only lynx-table→ PASS (guards pin the current waterline; any regression breaches)node benchmarks/bench.mjs --record --only lynx-table/--only lynx-table-web→ checked-in baselinesRisk / follow-ups
JSON.stringifylength — a structured-clone-cost proxy, documented as such.Provenance
agent-authored)Note
Low Risk
Test-only timeout and comment; no runtime behavior changes.
Overview
Raises the Vitest timeout on the Solana React hydration case from the default 5s to 30s, with a short comment that the shared
renderHydrationFixturepath starts a real Vite SSR server and can overrun the default on a busy CI shard.No production or hydration logic changes—only test stability.
Reviewed by Cursor Bugbot for commit 249395e. Bugbot is set up for automated code reviews on this repo. Configure here.