Skip to content

[lynx-js-framework-benchmark] Native list workloads: materialize, recycle, fling #202

Open

Description

@Huxpro

Relay issue

Work for Huxpro/lynx-js-framework-benchmark. The current matrix is the krausest superset: eager view tables. On Lynx the dominant production surface is native <list> with platform-driven cell materialization (componentAtIndex) and recycling (enqueueComponent) — and no featured case exercises it. Every framework's list story (who owns recycle identity, what crosses per cell, how much framework script runs per materialization) is currently invisible to the benchmark whose mission is to expose exactly that kind of dual-thread wiring.

Proposed cases

Three cases, same fixture ladder discipline as the table:

  1. list-startup@N — first screen with the table rendered inside a native <list> at 1k/10k rows: attach → first frame where the visible cells satisfy the content predicate. This is the lazy counterpart of the existing eager startup@N, and the pair prices eager-vs-virtualized first paint per framework.
  2. list-recycle — programmatic scroll by exactly one viewport, repeated: cost per recycled cell (the enqueueComponent→rebind round trip), with the wire meter attached — bytes crossing per recycled cell is the number that separates "recycle = component lifecycle" designs from "recycle = data rebind" designs.
  3. list-fling — sustained fling at fixed velocity: cells materialized per second, dropped/blank-cell frames (the platform shows blanks when materialization can't keep up — count them via the composed-DOM predicate), p50/p99 materialization latency.

Contract notes

  • The driver contract stays shared and versioned: list config (estimated sizes, buffer counts) is part of the case declaration, identical per entry; a framework that cannot express native <list> records an honest unsupported, not a forked fixture.
  • Native harness is where this matters most (real touch fling exists there); web-core's list emulation runs the same cases as the web half with the emulation caveat recorded in boundary.
  • Blank-cell counting needs a predicate rule: a blank is a materialization miss, data not DNF — same philosophy as "a slow framework looks slow, never absent".

Why now

Octane's side has open architecture work on compiled programs inside list rows (#193, #195): R2 there needs per-cell re-entry pricing that this suite would produce for every framework, turning a one-framework probe into a comparable, reusable instrument.

Activity

  1. Huxpro commented on Aug 26, 2026

    @Huxpro
    OwnerAuthor

    Benchmark audit / contract corrections before implementation:

    1. The documented shared author surface is declarative <list> + <list-item> with stable key / item-key, resolved list height, and scroll props/events. componentAtIndex / enqueueComponent describe renderer internals and cannot be required as a framework-authored shared API or directly timed across ReactLynx/Vue/Octane. The benchmark should observe materialization/recycling at a shared host boundary, not ask apps to call those internals.
    2. Current benchmark artifacts are eager-table-only bundles. A shared driver cannot transform an already-built framework tree into a native list. Each entry therefore needs an explicitly versioned list-fixture bundle/capability; until supplied, the correct result is unsupported, not a proxy fixture or DNF.
    3. Native Lynx has no DOM/composed-DOM contract. Blank-cell evidence must use a versioned visible-cell/native-tree observation exposed uniformly by the list fixture/harness. Web emulation must use a separate boundary/environment label and cannot be pooled with Native.
    4. “One viewport” and “fixed velocity” require viewport geometry, row estimate, buffer, duration, and input/scroll mechanism in the case receipt. Native real-touch fling and Web programmatic emulation are distinct contracts.

    I will implement this corrected capability/receipt boundary first, retain unsupported as data, and leave framework-specific hooks forbidden.

  2. Huxpro commented on Aug 26, 2026

    @Huxpro
    OwnerAuthor

    Implemented downstream in Huxpro/lynx-js-framework-benchmark#33 (benchmark issue #32), commit 739c81b.

    The implementation follows the corrected contract boundary:

    • framework-facing capability is a separately checksummed declarative list / keyed list-item fixture; apps do not call renderer internals
    • shared/versioned receipt: 390×640 viewport, 40px row estimate, two-row buffers, 20 exactly-one-viewport recycle repetitions, and a 4,800px/s × 1,500ms fling
    • Web and Native have explicit separate input/visible-cell observation mechanisms and never cross-rank
    • source metrics retain first visible content, elapsed/count/wire totals, materialization samples, and every blank frame; collector alone derives per-cell rates, materialized/s, and p50/p99
    • DNF is reserved for attempted driver/capture failure; non-zero blank frames remain measured data

    All current benchmark artifacts are eager-table-only, so the published 7-entry × 2-harness × 4-case ledger honestly reports 56 unsupported, 0 DNF, and 0 fabricated measurements. No framework-specific fallback or table proxy was added. The existing dataset is unchanged: after stripping only the new list fields, a rebuild is byte-for-byte identical to the #201 base (10,511 records, 1,423 comparison records).

  3. Huxpro commented on Aug 30, 2026

    @Huxpro
    OwnerAuthor

    Status review: the contract is built and honest (56/56 unsupported) — and the PaintingContext finding just made filling it urgent

    Reviewed benchmark PR #33 and the boundary corrections above. The corrections were the right calls, especially refusing to time renderer internals (componentAtIndex as observation boundary, not authored API) and refusing proxy fixtures — 56 unsupported / 0 fabricated is the honest ledger. The byte-identity replay against the #201 base is exactly the discipline we want.

    But the world moved under this issue, in its favor: #234 Part B established that the device ART charge is per platform peer and framework-invariant — so lazy list materialization is now the only lever that moves the device capacity boundary (~10,145 rows eager, for every framework). This suite went from "the missing production workload" to "the measurement home of the only capacity strategy that works." Follow-ups, in order:

    1. Rebase onto main after perf(lynx): cut keyed component materialization cost #31 (it sits second in the stack).
    2. Author the list fixtures that can exist today. ReactLynx and the Vue variants both ship declarative <list> surfaces; their list-startup@N fixtures need no framework work — just the versioned fixture bundles the contract already specifies. Turning even 2 of 7 entries from unsupported to measured makes the suite live, and gives the eager-vs-virtualized startup pair its first real numbers (including whether virtualized entries survive 10k/30k native where every eager entry DNFs — the capacity claim, measured).
    3. The Octane cells arrive on a schedule, not a wish: Research: the native list boundary — what the platform can consume today, what a cell re-entry costs, and whether #193's compiled-row surface is buildable #195's Layer 1 (program-per-cell inside the callback, queued as The create residual: attribute it, tax-test it, then extend compiled programs to steady-state mounts (E-train) #230 item 7) produces our list-capable build; its report also priced the target (1.20 ms framework/materialized cell) — when that build lands, list-recycle's per-cell numbers are its acceptance instrument. Note the dependency in the PR so neither side re-derives it.
    4. Native fling windows ride the existing device-lease pipeline (Device measurement round 1: the four questions the web windows cannot answer (#163 clause 4) #194 protocol); web emulation cells first, native only for fixtures that pass web.

    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions