Repository navigation
Closed
Description
Umbrella plan for the Octane-on-Lynx performance program. One sub-issue = one PR-sized optimization. Work them in order within each track; check items off here as PRs land. Research provenance: cross-framework analysis in Huxpro/vue-lynx PR #356 (evidence archive: slides/public/compare-data/ — captured commit payloads, stage-timer patch, real compiler outputs for both slices, same-host benchmark JSON).
The analysis in five sentences
- Octane's Lynx renderer is architecturally the same model as ReactLynx — owner re-render + retained-tree diff + block-grade compiled templates (
universalPlan= structure tree + slot table, compiled into both slices) + one-shot MT first frame with adoption — so its theoretical ceiling is the ReactLynx tier, not vapor's (vapor's point-update tier requires per-binding reactivity, a model octane deliberately didn't choose). - The measured gaps were never "a slow renderer": they are single-threaded-era guard policies running across a priced boundary — identity equality on non-primitive slot values made wire cost O(tree) per commit (2.4MB / ~30k commands for a 2-row select @10k; vue vapor ships 39B for the same click), fixed in feat(lynx): change-size-proportional commit wire cost, with a gated cross-framework benchmark (integration of 3 upstream PRs) #1.
- The old updateStorm "win" was accidental backpressure coalescing (50 ticks → ~19 commits while MT chewed 2.4MB batches); feat(lynx): change-size-proportional commit wire cost, with a gated cross-framework benchmark (integration of 3 upstream PRs) #1 made the coalescing contract explicit and the trap fired exactly as predicted (storm wall-clock regressed toward the layout floor) — recovering it deliberately is [lynx-perf 2].
- After the wire fix, the dominant point-update cost is replay breadth: owner = the list component, so
universalForrebuilds all N items' props for a 2-row change; the compiler already has everything needed to auto-memo item components ([lynx-perf 3] — React's hand-writtenmemotier, automated). - The remaining constants live in the transport machinery itself: per-node create commands ignoring the plan's block information ([lynx-perf 4]), always-on per-command validation ([lynx-perf 5]), eager ack handles + third message ([lynx-perf 6]), and a 59KB-gzip MT slice evaluated before first paint ([lynx-perf 7]).
Trajectory (10k rows, rig-host medians; references same host: vue-vdom select 164 / react 170 / react create 1717 / vue-vdom create 2133)
| after | select | update10th | create | FCP | updateStorm@10k | bundle gzip |
|---|---|---|---|---|---|---|
| pre-#1 | 1374 | 1493 | 4416 | ~1090 | 3054 (accidental win) | ~102.8KB |
| #1 (landed in-PR, measured) | 857 | 1044 | 4444 | ~1090 | 3962 (trap fired) | — |
| + [lynx-perf 2] throttling | — | — | — | — | ≤3100 → actual 3524 = 1.07× vdom (vdom itself 3308 on that run; ratio parity reached, abs band anchored to a faster host — see #3 comment; PR #10) | — |
| + [lynx-perf 3] auto-memo | 150–250 → actual 274 = 1.95× vdom (vdom 141 same run; @1k parity at 1.15×) | 200–350 → actual 473 = 2.60× vdom | 4459 (unchanged) | — | actual 1460 = 0.51× vdom / 0.93× vapor — storm crown reached; selectStorm 487 = 0.35× (PR #11) | — |
| + [lynx-perf 4] plan wire | — | — | 2400–3000 → actual 4669 ±277 = 2.08× vdom (vdom 2249 same run; deterministic gates met exactly: 160k→10k commands = 1.00× the one-per-row floor, commit bytes −69%; runtime probe proves folding active in the real bundles — create is PAPI-bound, the band needs code-staged MT create, see #5 comment; PR #12) | ≥unchanged (first-screen path untouched) | — | — |
| + [lynx-perf 5] validation | — | — | −10~15% more → actual MT prepare 3.8× faster (whole-run rig 11.2s→2.9s, validate ~90×, counters byte-identical; web create wall-clock not re-measured — prepare is not its bottleneck, see #5) | −100ms+ → actual ±0, within noise (first screen is MT-rendered, validation never sat on the FCP path — see #6 comment; PR #13) | — | — |
| + [lynx-perf 6] protocol | tail −10ms → actual ±0, wash (Lynx-for-Web select 30→29 @1k, 134→134 @10k, all deltas within n=3 spread — the ack tail never carried 10 ms of payload; the realized wins are deterministic: messages 3→2, paced-storm commits 50→3, idle re-renders 0 bytes. The web harness also caught a real tap-freeze regression in the first cut, fixed + pinned — see #7 comment; PR #14) | — | — | — | — | ≈0 (web bundle 408.8 kB unchanged; the dev cross-check folds out of prod builds) |
| + [lynx-perf 7] diet | — | — | — | ~800–900 → actual ±0, wash (interleaved A/B same host window, deltas inside ±900ms host noise; the band belongs to the pre-migration 2.8GHz host — see #8 comment; PR #15) | — | ≤80KB → actual not met: 128.8KB IFR — realized win is the MT slice: −3.6% gzip (70.4→67.8KB), no-worklet bundles shed the whole worklet runtime, BG byte-identical; the −25% projection counted mass usedExports DCE + [lynx-perf 5/6] had already dropped (string diet measures −234B gzip, unification <1KB — both rejected with data); 4 frozen per-slice budget gates added, see #8 comment |
| ceiling (RL reference) | ~170 | ~273 | 1717 (long-term) | 459 (structural) | octane keeps the storm crown | 31.9KB (not reachable) |
Numbers are host-bound; the portable claims are the ratios and the deterministic gates (command counts, commit bytes, item-render counts, gzip-per-slice) enforced by benchmarks/lynx-table + ratios.json.
Checklist (one PR each)
- [lynx-perf 1] [lynx-perf 1] Land value-semantic slot equality (implemented in #1 — rebase, review, merge) #2 — land feat(lynx): change-size-proportional commit wire cost, with a gated cross-framework benchmark (integration of 3 upstream PRs) #1 (rebase, review, merge; file its follow-ups on [lynx-perf 2] Frame-aligned commit throttling — recover the storm wall-clock deliberately #3 and [lynx-perf 6] Protocol slimming: lazy ack handles, merged completion, empty-commit elision #7)
- [lynx-perf 2] [lynx-perf 2] Frame-aligned commit throttling — recover the storm wall-clock deliberately #3 — frame-aligned commit throttling (recover storm wall-clock; depends on [lynx-perf 1] Land value-semantic slot equality (implemented in #1 — rebase, review, merge) #2) — PR perf(lynx): frame-aligned commit pacing for the dual-thread transport #10 (stacked on feat(lynx): change-size-proportional commit wire cost, with a gated cross-framework benchmark (integration of 3 upstream PRs) #1), measured outcome on [lynx-perf 2] Frame-aligned commit throttling — recover the storm wall-clock deliberately #3
- [lynx-perf 3] [lynx-perf 3] Compiler-backed auto-memo for keyed list items — kill O(N) replay breadth #4 — compiler-backed auto-memo for keyed list items (depends on [lynx-perf 1] Land value-semantic slot equality (implemented in #1 — rebase, review, merge) #2; biggest remaining lever) — PR perf(octane): transported universal roots adopt retained subtrees — render breadth proportional to change size ([lynx-perf 3]) #11 (stacked on perf(lynx): frame-aligned commit pacing for the dual-thread transport #10): the existing retained-subtree adoption extended to transported roots; no compiler machinery needed, measured outcome on [lynx-perf 3] Compiler-backed auto-memo for keyed list items — kill O(N) replay breadth #4
- [lynx-perf 4] [lynx-perf 4] Plan-aware wire: instantiate-by-plan-id instead of per-node create commands #5 — plan-aware wire: instantiate-by-plan-id (independent) — PR perf(lynx): plan-aware wire — fold provable plan instances into instantiate-by-plan-id commands ([lynx-perf 4]) #12 (stacked on perf(octane): transported universal roots adopt retained subtrees — render breadth proportional to change size ([lynx-perf 3]) #11): content-derived plan IDs + negotiated announcement, zero compiler changes; command/byte gates met exactly, wall-clock band not reached (PAPI-bound, proof and follow-up on [lynx-perf 4] Plan-aware wire: instantiate-by-plan-id instead of per-node create commands #5)
- [lynx-perf 5] [lynx-perf 5] Validation diet: full structural checks in dev, envelope-only in production #6 — validation diet: dev-deep, prod-fast (independent) — PR perf(lynx): validation diet — dev-deep, prod-fast commit validation ([lynx-perf 5]) #13 (stacked on perf(lynx): plan-aware wire — fold provable plan instances into instantiate-by-plan-id commands ([lynx-perf 4]) #12): envelope + load-bearing checks stay, deep walks and the whole-tree prepare pass compile out of prod; prepare 3.8×, fail-stop pinned by a prod-module suite; FCP unchanged (not on its path), measured outcome on [lynx-perf 5] Validation diet: full structural checks in dev, envelope-only in production #6
- [lynx-perf 6] [lynx-perf 6] Protocol slimming: lazy ack handles, merged completion, empty-commit elision #7 — protocol slimming: lazy ack handles, merged completion, empty-commit elision (independent) — PR perf(lynx): protocol slimming — derived ack handles, merged completion, empty-commit elision ([lynx-perf 6]) #14 (stacked on perf(lynx): validation diet — dev-deep, prod-fast commit validation ([lynx-perf 5]) #13): derived ack handles (dev keeps main's payload as a fail-stop cross-check), merged completion, empty-commit elision under a two-watermark model; messages 3→2 and 0-byte idle re-renders pinned deterministically, wall-clock a wash on both instruments (reported honestly); the real-browser harness caught an engine-tap watermark regression that the in-process rig could not see — fixed + regression-tested, measured outcome on [lynx-perf 6] Protocol slimming: lazy ack handles, merged completion, empty-commit elision #7
- [lynx-perf 7] [lynx-perf 7] Receiver diet: shrink the MT slice, spend it on FCP #8 — receiver diet: shrink the MT slice for FCP (best after [lynx-perf 5] Validation diet: full structural checks in dev, envelope-only in production #6/[lynx-perf 6] Protocol slimming: lazy ack handles, merged completion, empty-commit elision #7) — PR perf(lynx): receiver diet — lazy worklet bridge, per-slice gzip gates ([lynx-perf 7]) #15 (stacked on perf(lynx): protocol slimming — derived ack handles, merged completion, empty-commit elision ([lynx-perf 6]) #14): lazy worklet bridge (no-worklet MT bundles shed the registry/call-bridge machinery, −3.6% gzip, BG byte-identical) + frozen per-slice gzip budget gates; the string diet (−234B gzip) and plan unification (<1KB for real first-screen risk) rejected with byte evidence, measured outcome on [lynx-perf 7] Receiver diet: shrink the MT slice, spend it on FCP #8
Working agreements
- Every PR is measured with the same rig (
benchmarks/lynx-table) against the vendored ReactLynx / vue-vdom / vue-vapor reference bundles; no octane-only bespoke workloads; a cell that can't be driven reports "not measured", never a degraded number. - Deterministic counters gate; wall-clock informs. Ratio changes in
baselines/ratios.jsoncarry a one-line justification each. - Equality and validation predicates must be realm-safe (no
Object.prototypeidentity, no instanceof across the boundary) — the fix(lynx): validate cross-realm messages and accept a null event target id on Lynx for Web octanejs/octane#459 lesson; the vm two-realm rig runs in CI with validation ON. - No architecture changes anywhere in this program: Blueprint/LogicalRecord/commands/versioned protocol/adoption all stay. These are guard-policy and transport-shape fixes.
- Beyond this list (create → react's 1717, FCP → 459) requires code-staged MT plans and a structurally lighter runtime — a separate architecture decision, re-measure first, don't pre-commit.
Metadata
Metadata
Assignees
Labels
No labels
Activity
Huxpro commentedon Aug 9, 2026
Roadmap closing summary — what the predictions got wrong, and what held
All seven items are now resolved: six shipped as the stacked PRs #10 → #11 → #12 → #13 → #14 → #15, and [lynx-perf 1] (landing PR #1 itself) is the remaining gate, owned by the split/rebase track. Since the working agreement was "report honestly", here is the audit of every prediction against its measurement.
The wrong predictions, one per item
usedExportsDCE plus [lynx-perf 5/6] had already removed. Its two secondary levers evaporated under measurement: 10,153 raw bytes of diagnostic strings compress to a −234 B gzip delta, and the plan-materialization unification shares < 1 KB of genuinely common code. The durable result is structural: no-worklet apps no longer pay for the worklet runtime at all, and four frozen per-slice gzip budgets now gate regressions.The patterns behind the misses
What actually moved Octane-on-Lynx
The wire fix (#1: select 1374→857), auto-memo (#11: select 274, update10th 473, storm crown 1460 = 0.51× vdom), explicit pacing (#10), and prod prepare 3.8× (#13) — with the protocol/wire/bundle shape now pinned by ~24 deterministic guards in
ratios.jsonso none of it can silently regress. Select/update sit ~1.9–2.6× vdom against a ~1.0× ceiling; create and FCP are PAPI/architecture-bound beyond this program's charter, exactly as the final "Beyond this list" clause anticipated.Remaining: [lynx-perf 1] — land PR #1 and the stack above it (#10–#15, one rebase cascade once #1's split settles).
Generated by Claude Code
Huxpro commentedon Aug 9, 2026
Season 2 is now planned: #21 — [lynx-perf-s2] code-staged Octane (sub-issues #16–#20, dependency-ordered, one PR each).
Continuity from this roadmap: the S2 chain builds directly on what S1 banked — #12's content-derived planIds are the codegen registry key, #11's auto-memo already put select inside S2's target band, #13's dev-fold and #14's derivation-cross-check are the safety patterns, #15's sideEffects/DCE lesson and slice budgets are the packaging constraints — and S2's central calibration (code-staging only pays bundled with protocol collapse) is the direct product of this roadmap's two "failed" predictions (#12's flat create, #15's −3.6%). The two structural items this roadmap closed as out-of-scope (create → 1717, FCP → 459) are exactly S2's targets, with the honest cap written in: the last ~100–150ms of RL's constants are structural and not chased.
[lynx-perf 1] (landing PR #1 and the stack) remains this roadmap's only open item.
Generated by Claude Code
Huxpro commentedon Aug 11, 2026
Live-main audit (2026-08-11): historical S1 roadmap resolved. Wire tooling landed as octanejs#660–octanejs#662; retained adoption landed as octanejs#696; plan/protocol/materialization paths were superseded by octanejs#693/octanejs#700; pacing and worklet residuals failed their current product gates and moved to #45/#44. Closing this umbrella with the measured conclusions preserved in its comments and PRs.