Repository navigation
feat(lynx): change-size-proportional commit wire cost, with a gated cross-framework benchmark (integration of 3 upstream PRs) - #1
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
/benchmarks gains an "Octane on Lynx" section between the head-to-head targets and the authoring cliff, charting the two lynx-table baselines: - the Lynx-for-Web wall clock — Octane, ReactLynx, and both Vue Lynx renderers on the same table app under one byte-identical page driver (host-bound medians; the cross-framework ratios are the portable reading). Vue's two renderers wear an ordinal ramp of the Vue orchid, following the octane-variant precedent. - the deterministic commit wire cost against the changed-rows floor, with a new 'count' card format for unitless exact counters. The gap between the two bars is the KNOWN GAP the lynx-table ratio guards pin; fixes tighten the guards and visibly close the bars. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SW6xKsEpmsN7rFu4K9mFM9
…ee size On a transported root every object-valued host prop is re-encoded through the wire clone per render, so the identity-based prop diff could never certify sameness: a one-row select over 10,000 rows shipped ~30,000 commands / 2.4MB. Three cuts: - Value-semantic prop diff: exported sameUniversalHostPropValue (Object.is fast path, depth-2 structural equality over arrays and plain records from any realm via a universal-side hasCrossRealmPlainPrototype, the twin of packages/lynx/src/core/plain-object.ts). Used by shallowPropsEqual, and cloneSerializableValue accepts cross-realm plain objects through the same predicate. - Events re-announce only what the host can observe: a re-created equivalent handler keeps its stable listener ID and the background dispatch table always rebinds to the newest closure, so only a new listener, priority change, or owner change emits a command. Host callbacks (attach) keep closure-identity announcement — their re-run on handler replacement is an observable contract. - Compiler lowers statically string-or-falsy class arrays to their clsx-composed string (all-literal arrays fold to a static plan prop) and folds string-literal children and literal attribute values into the frozen plan, so hot per-row slot values are primitives. The transport's backpressure coalescing (renders scheduled while a commit awaits acknowledgement fold into one commit carrying the latest state) is now an explicit, tested contract. select@10k: 30,000 cmds / 2,406,468 B -> 2 cmds / 225 B. All 12 lynx-table ratio guards tighten from KNOWN GAP ceilings (31x-15,000x) to 1.0x-1.5x floors; baselines re-recorded. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SW6xKsEpmsN7rFu4K9mFM9
98ba1e2 to
e14d600
Compare
|
Heads-up from validating stacked PR #10 on this branch's tip ( Generated by Claude Code |
|
Conclusion: close this historical integration PR. Its useful runtime work landed upstream through octanejs/octane PRs 660, 661, and 662; replaying this branch would duplicate or regress current main. |
Structure
This branch is now the integration stack of the three upstream-ready PRs, rebased onto upstream
main@1c44117b(forkmainitself is synced further, tocdb501c9; the three newer upstream commits touch none of these files):lynx/bench-wire-instrumentation— bench(lynx): gate the dual-thread commit wire cost against a changed-rows floor. The__OCTANE_LYNX_PROFILE__-gated wire profiler in@octanejs/lynx,benchmarks/lynx-table(deterministic wire-cost gates + Lynx-for-Web wall-clock harness with vendored ReactLynx / Vue vdom / Vue vapor reference bundles), and 12ratios.jsonguards pinned at the measured KNOWN GAP waterline.lynx/bench-website-viz— docs(website): chart the Lynx suites in their own benchmarks section. New "Octane on Lynx" section on /benchmarks: cross-framework wall clock + commit wire cost vs the changed-rows floor (new'count'card format).lynx/wire-payload-change-size— perf(lynx): make commit wire cost proportional to change size, not tree size. Value-semanticsameUniversalHostPropValueprop diff, event re-announce only on observable change, compiler lowering of static class arrays / literal children into identity-stable slot values, explicit tested backpressure-coalescing contract, and all 12 guards tightened from 31×–15,000× ceilings to 1.0×–1.5× floors with re-recorded baselines.Two defect fixes from the previous revision of this branch were dropped because upstream already landed them: cross-realm plain-object acceptance (upstream octanejs#459) and
target.id: nullnormalization (upstream octanejs#578). One cut was narrowed against an upstream contract: host callbacks (attach) keep closure-identity re-announcement, because an attach callback observably re-runs (detach + attach) when its handler closure is replaced (universal-event-scope.test.ts); only event listeners stop re-announcing.Summary
benchmarks/lynx-table: deterministic wire-cost harness (command counts + serialized commit bytes, CI-gated inratios.json) plus a Lynx-for-Web Chromium harness measuring octane against vendored ReactLynx / Vue vdom / Vue vapor reference bundles with one shared, byte-identical page driver.Measured
Deterministic wire cost (in-process, real dual-thread path, real tap tokens):
The "before" bytes reproduce the captured production payload byte-for-byte (2,406,468).
Lynx for Web wall clock (4-core CI-class host, same instrument for every cell, medians of n=3; ratios vs vue-vdom are the portable claim), 10,000 rows, before → after:
Validation
pnpm format:checkObject.isand event handler-identity term each make the new tests fail)node benchmarks/bench.mjs --quick --ratios --only lynx-table→ PASS at the tightened floors--record --only lynx-table/--only lynx-table-web)Risk / follow-ups
🤖 Generated with Claude Code
https://claude.ai/code/session_01SW6xKsEpmsN7rFu4K9mFM9