Skip to content

[lynx-perf-live 8] Instrument the ReactLynx reference with the same stage decomposition to attribute the FCP residual #50

Open

Description

@Huxpro

Classification

Measurement/attribution infrastructure. Extend the benchmarks/lynx-table/stages decomposition to the vendored ReactLynx reference (and, as a third data point, Vue vdom+IFR+ET), so the dominant unattributed segment of Octane's startup — layout_flush_residual — can be split into a shared Web Core floor and Octane-specific work. Instrument-only: no product change ships from this issue; its verdicts gate which product experiment (if any) is authorized next.

Evidence

The post-octanejs#706/octanejs#707 decomposition (stages/results/live-10000.md) attributes Octane FCP@10k as:

segment median ms share
mt_slice_eval 20.6 1.2%
plan_interpretation 124.3 7.3%
papi_element_creation 523.6 30.8%
layout_flush_residual 1035.4 60.9%

Raw profile 1730.2 ms / control 1678.3 ms.

On the same machine class, the featured run at 9b147781 (raw run) records ReactLynx FCP@10k = 1075 ms total — smaller than Octane's residual segment alone (1035 ms), for the same app semantics, the same row count, the same Web Core, and (proven by the deterministic gate) the same semantic-floor element count per row.

That is the mystery this issue exists to resolve: both frameworks pay the same style/layout/publication floor for an identical composed tree, yet React's entire startup fits inside what our instrument currently lumps into one unattributable residual. The residual bundles PAPI prop/insertion work, __FlushElementTree, Web Core DOM publication, style/layout, and observer delay "because the host exposes no stable boundary between those costs" — which is exactly why every remaining FCP hypothesis is currently unfalsifiable. #47's decision correctly NO-GO'd wire/value encoding, ACK-only, and receiver-mass experiments for create (PAPI + host materialization owns 69.5–79.6%); FCP has had no equivalent cross-framework attribution, and startup is now Octane's largest featured-cell deficit (1766 ms vs React 1075 ms at 9b147781; ~1730 ms on the instrumented integration head).

Hypothesis

React's 1075 ms is an upper bound on the shared floor. Octane FCP = shared floor + Octane-specific work; the ~650–700 ms delta lives in one or more of:

  1. Publication op count — Octane's first screen may emit more PAPI/publication operations per row (separate prop/event/insertion commands) than ReactLynx's create-inlined snapshot create() stream; Web Core publication cost is per-op.
  2. Flush cadence — the number of __FlushElementTree commits before first paint; each flush can trigger a style/layout pass in Web Core. One flush vs N chunked flushes is a framework decision, invisible to the current instrument.
  3. First-paint scheduling — dead time between slice evaluation and the first PAPI call (deferred paint via __RenderPage/PageConfig timing); currently lands in the residual.
  4. Per-element creation stream shape — element count is at the semantic floor, but per-element call sequences may differ in cost.

The owner must be observed before any representation change. A hypothesis that fails the gate below is recorded as NO-GO exactly like #47's create verdicts.

Investigation

  1. Instrument at the PAPI/Web Core boundary in the harness page, not inside either framework: wrap __Create*, __SetAttribute/__SetClasses/prop setters, __AddEvent, insertion ops, and __FlushElementTree with counters and exclusive timers. Because the boundary is host-side, the identical probe applies to Octane, ReactLynx, and vdom+ET bundles by definition — no framework-specific stage names needed.
  2. Record per entry, per scale (1k/10k/30k): PAPI call counts by kind; flush count and per-flush wall before the first composed paint; timestamps for script-eval start → first PAPI call → last PAPI call before paint → each flush → composed-tree predicate. Keep the existing fresh-page AB/BA protocol, n≥5, control overhead ≤1.05×.
  3. Express Octane FCP as shared floor (measured on React with identical boundaries) + attributed Octane-specific segments, with the unattributed remainder of the delta ≤10%.
  4. Gate: a candidate owner must contribute ≥10% of the Octane−React FCP delta, directly observed, before any product experiment is authorized. Each of the four hypotheses above gets an explicit GO/NO-GO verdict.
  5. Instrumented reference bundles are separate artifacts; featured reference bundles and their recorded hashes are untouched.

Acceptance

  • A frozen report beside live-*.md decomposing ReactLynx FCP@1k/10k/30k with the same shared boundaries, plus the op-count/flush-cadence/start-delay comparison table for Octane vs ReactLynx vs vdom+ET;
  • Octane's FCP delta over React is attributed with ≤10% unexplained remainder, and each candidate owner carries a measured GO/NO-GO verdict at the 10%-of-delta gate;
  • PAPI op counts and flush counts scale linearly 1k→30k or the nonlinearity is itself attributed;
  • Zero product-code changes; reference bundle hashes used in featured runs are unchanged; control overhead stays ≤1.05×;
  • Evidence records source SHAs, bundle hashes, host/browser versions, sample order, n, medians, spread, and zero DNF/null cells.

Non-goals

  • No product packet, renderer, or compiler change lands from this issue — it produces verdicts, not fixes.
  • Not permission to re-litigate the create-side NO-GOs ([lynx-perf-live 5] Measure template ingress ownership and split host materialization #47: wire/value encoding, ACK-only, receiver mass).
  • No changes to the benchmark app, row semantics, DOM predicate, or featured reference bundles.
  • Native-staging (elementTemplates) experimentation is a separate issue; this issue's op-count and flush-cadence verdicts are expected to be its gating evidence.

Provenance

  • An agent authored this issue (agent-authored).

Activity

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

    agent-authoredenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions