Repository navigation
Description
Classification
Performance enhancement in the Lynx keyed-reorder transport and host-application path.
Evidence
Exact same-machine featured run at live upstream 9b147781c9b4ec4df053a059633978ddc0ed922a:
- Octane swap@1k:
50.84 ±2.80 ms - ReactLynx:
25.02 ±3.69 ms - Vue cells:
16.86–18.80 ms - Octane total BTS↔MTS wire:
54,907 B - React/Vue total wire:
640–932 B - Octane sampled MTS CPU:
56.657 ms
The operation swaps rows 1 and 998 while preserving every keyed row and its observable identity. The result is stable and has zero DNF. Evidence: raw featured run and benchmark PR.
Contract
A keyed reorder guarantees final order and survivor identity. It does not guarantee React's physical move set or any exact internal move count. The optimization gate may measure commands/bytes, but behavioral tests must assert order, identity, live events/refs, and cleanup rather than private reconciler steps.
Hypothesis
The retained keyed rows are not doing useful application work proportional to 1,000 rows, but the transported batch or main-thread preparation may still publish broad topology, attachment, lifecycle, or public-handle state. The 54.9 KB payload for a two-row reorder is the first owner to explain; do not assume the LIS reconciler is at fault before capturing the actual batch.
Investigation
- Extend the deterministic
lynx-tablegate with swap: command histogram, serialized bytes by direction, Row body renders, handle/list-ancestry deltas, and final survivor identities. - Attribute background replay/staging, wire clone/transfer, main-thread validation/prepare/apply, PAPI moves, acknowledgement, and presentation.
- Prove whether cost scales with moved top-level hosts or total retained rows by running 1k/10k/30k controls with the same two-row swap.
- Only after attribution, evaluate topology-only move encoding, narrower attachment publication, or compact completion on the owning layer.
- Keep mixed-version peers, portals, lists, lifecycle callbacks, refs, worklets, rejection, rollback, and stale generations on their explicit safe paths.
Acceptance
- same-machine forward and reverse runs both improve swap@1k by at least 25% and bring the candidate within 1.5× the five-entry React/Vue median;
- swap wire is at most 2 KiB and scales with moved top-level hosts, not total retained rows;
- deterministic counters prove unchanged rows do not render or republish host/public state;
- final DOM order, survivor DOM/host identity, focus, delegated events, refs, lifecycle callbacks, and fault rollback pass;
- create, replace, append, remove, clear, update/select, storms, startup/FCP, heap, and Web/Lynx gzip have no >5% adverse decision cell;
- every timing claim uses the same machine, build inputs, semantic result, warmup, and forward/reverse order.
Non-goals
- Do not pin an exact physical move set; Octane's LIS reconciler may choose any valid minimum-compatible placement sequence.
- Do not special-case the benchmark indices or row component.
- Do not trade keyed identity, events, refs, focus, or rollback safety for a smaller packet.
Provenance
- An agent authored this issue (
agent-authored).
Activity
Huxpro commentedon Aug 11, 2026
Review update after #43–#45
Decision: keep this issue open; its contract and acceptance thresholds remain valid, but reset its measurement base after the accepted upstream candidates are integrated.
Execution plan
9b147781result directly. After perf(lynx): specialize compact run teardown octanejs/octane#706 and perf(lynx): keep optional worklet runtime cold octanejs/octane#707 land (or on an explicit integration commit containing their final SHAs), rebuild the exact featured benchmark and record the new Octane bundle hashes. Re-run every ReactLynx/Vue reference entry from the same lockfile and host; keep those rows as controls rather than copying the earlier table.>=25%,<=2 KiB, identity/focus/event/ref, andno >5% adverse cellgates unchanged.Official baseline remains pending until the upstream candidates merge; gzip deltas from octanejs#706 and octanejs#707 are non-additive and must not be combined arithmetically.
Huxpro commentedon Aug 12, 2026
Executed against the required post-octanejs#706/octanejs#707 stack and then re-based/revalidated on real upstream
mainafter both PRs merged (ffadd397).Upstream draft PR: octanejs#716
Published head:
50ddc5c8ea315c712d1974db73e06229408fc41fDecision
GO. The universal keyed planner was the observed owner for far swaps. The submitted O(n log n) LIS planner reduces a 1,000-row far swap from 997 move commands / 47,986 bytes to 2 moves / 368 bytes. The two-move result also holds at 10k and 30k, with zero row renders, survivor identity preserved, and events still routed to the correct rows.
Exact live v2 evidence
2026-08-11T23-22-41-65160668d8d9-issue46-lis-v2-featured.json2026-08-11T23-49-03-65160668d8d9-issue46-lis-v2-featured-reverse.jsonBundle and validation
Latest-main rows=0 delta:
Passed:
pnpm syncThe current dirty worktree was not modified; the issue was implemented in an isolated worktree/branch.