Skip to content

Attribute the 1.6× web-startup gap to ReactLynx before deciding whether to chase it #247

Open

Description

@Huxpro

The gap, and why it is now the only unowned one

FCP on the web harness, post-fix tip, all three regimes (lynx-js-framework-benchmark#41):

scale octane-hux upstream octane react hux/react
1k 248 245 146 1.70×
10k 1,632 1,518 1,022 1.60×
30k 4,699 4,437 2,992 1.57×

Facts already settled:

  • Parity with upstream holds (±3–6%) — the compiled-first-screen hypothesis vs upstream is met; this issue is about react.
  • The boundary is fair: perf(lynx): cut keyed component materialization cost #42 D verified react shares the same attach start, content predicate, and bundle-serving path.
  • It is bytecode volume, not JIT behavior: the ratio is invariant across web / web-interp / web-interp-4x (1.70→1.69× @30k). Whatever runs, runs ~1.6× more of it — LepusNG will charge the same ratio.
  • react is an outlier against everyone: it also beats every Vue variant by 40%+. Part of its advantage may be a structurally smaller startup surface, in which case the right verdict for part of this gap is "accepted cost", not "defect".

Order 1 — attribution (the deliverable; no optimization until this lands)

Split load→FCP for octane-hux and react at 10k on the web harness into the segments the harness can already see, using the C9–C17 methodology (one hypothesis per window, controls stated, recipes as repo artifacts per the #230 protocol):

  1. bundle evaluation (script eval start→end, both sections; correlate with mtsSectionRaw/btsSectionRaw — are we simply shipping/parsing more?);
  2. web-core boot to first render call (host setup, worklet registry, transport install);
  3. first-screen render (the paint itself — the pipeline suite says our per-call PAPI is peer-parity and Props is best-in-field, so if the gap is here it is in walk/bookkeeping around the calls, not the calls);
  4. anything between render done and the FCP predicate (flush, style/layout interleave, the ready handshake).

Deliverable: a table putting the ~610ms @10k into those four buckets for both entries, with the react bucket sizes as the control. State explicitly which buckets scale with rows and which are constant (the 1k/30k ratios above suggest mostly row-scaled).

Order 2 — verdicts per bucket, not one verdict

For each bucket: fixable (names the mechanism and files a slice), bounded (structural to our model — e.g. two-arm agreement work react does not do — record as accepted cost with the number), or already-owned (e.g. the create-path share overlaps #242 Cause A / E1 — cross-reference, don't duplicate). The oracle for any fix slice that follows: FCP@10k ≤ 1.3× react without regressing FCP-vs-upstream parity or any adoption/announcement invariant — no weakened invariants buy milliseconds.

Sequencing

After E2 (#243/#245) and the E1 design issue — this is a gap against react, not against the theoretical hypotheses, and the E-train's create work may move bucket 3 for free (#242 Cause A removes 10k first-screen elements; measure it in Order 1's window rather than guessing). Base: current new-lynx.

Related: #41 (lane data), #42 D (boundary fairness), #242 (element diet), #230 (protocol amendments that bind this issue's measurements).

Activity

  1. Huxpro commented on Aug 30, 2026

    @Huxpro
    OwnerAuthor

    Order 1 — attribution

    First, the harness could not answer this, and the reason was not the instrument

    Every vendored reference reported FCP@N as "not measured", because a
    pre-populated first screen is a build-time define of the app source. So Octane's
    first screen had no cross-framework control at all — it could only be compared
    against its own composed startup + create@N projection, whose own error was the
    only bound on how far that composition sat from a real first screen.

    #251 fixes it: reference/react-first-screen vendors ReactLynx built with a
    pre-populated first screen, one bundle per row count, hash-pinned in
    reference/manifest.json and re-checked against those digests on use. It is a
    second set beside reference/react rather than a rebuild of it, for exactly
    the reason that cell gave for having no variant — rebuilding it would change the
    hash the featured runs recorded. It also adds the FCP delta section to
    papi-report.mjs, which could not exist before: the harness's own candidate-owner
    attribution had create and startup and nothing for the first screen.

    The workload control passes, which is what makes any number below mean
    anything. The two react cells are different builds — @lynx-js/react 0.124.0
    against 0.122.1, different upstream commit — and they issue the same 21.0001
    host calls per row
    in the create window, within noise on the wall clock. Same
    benchmark.

    Recipe, in repo, one line; record checked in as stages/results/c247-o1-*:

    node stages/papi-run.mjs --cells octane,react,react-first-screen \
      --scales 1000,10000 --reps 5 --label c247-o1

    The gap reproduces

    FCP on the control pages (no probe), median of 5, one interleaved window.
    Three windows were measured; two of them are the same code, which is how the
    numbers below get an error bar:

    window code scale octane react-first-screen delta ratio
    c247-o1 new-lynx 10,000 1231.2 872.7 +358.5 1.411×
    c247-o1-direct new-lynx 10,000 1252.6 862.6 +390.0 1.452×
    c247-o1 new-lynx 1,000 163.7 103.9 +59.8 1.576×
    c247-o1-direct new-lynx 1,000 170.0 107.1 +62.9 1.587×

    #247's table reads 1.70× @1k and 1.60× @10k. Those cells are not these cells —
    that octane is block-core at 07115d67, this one universal-core at the new-lynx
    head, and the react bundles differ too — so the absolute ms do not compare across
    the two campaigns and I am not claiming they do. What reproduces is the shape: a
    first-screen gap in the 1.41–1.59× band that shrinks as rows grow.

    The four buckets

    Timed build (the only build carrying stage decomposition), medians of 5, both
    same-code windows shown
    so the reader can see which bucket is stable:

    @10,000

    # bucket octane react-first-screen delta share scales with rows?
    1+2 bundle eval + boot (start_delay) 21.2 / 20.0 11.8 / 12.0 +9.4 / +8.0 2.0% / 2.3% constant
    3 first-screen render, at the host boundary 864.9 / 855.1 736.8 / 791.9 +128.1 / +63.2 26.9% / 18.0% row-scaled
    4 render → FCP predicate (off_boundary) 521.2 / 530.0 222.7 / 238.6 +298.5 / +291.4 62.7% / 82.8% row-scaled

    @1,000

    # bucket octane react-first-screen delta share
    1+2 bundle eval + boot 21.4 / 19.6 7.5 / 7.9 +13.9 / +11.7 16.5% / 19.8%
    3 first-screen render 100.4 / 95.1 84.4 / 83.0 +16.0 / +12.1 19.0% / 20.5%
    4 render → FCP predicate 74.6 / 70.6 28.3 / 26.7 +46.3 / +43.9 55.1% / 74.3%

    Row-scaled or constant, ×10 rows from 1k to 10k, on the c247-o1-direct
    window (both agree):

    bucket octane react-first-screen verdict
    1+2 bundle eval + boot ×1.02 ×1.52 constant
    3 first-screen render ×8.99 ×9.54 row-scaled
    4 render → FCP predicate ×7.51 ×8.94 row-scaled

    Which buckets survive a same-code repeat, and which do not. Buckets 1+2 land
    at 2.0–2.3% of the gap in both windows. Bucket 4's absolute delta is the most
    stable quantity in the whole measurement: 298.5 and 291.4 ms here, and
    302.8 ms in the Cause A window below — three windows, two code states,
    within 2% of each other. Bucket 3's delta is not stable: 128.1 vs 63.2 ms,
    because the timed probe's overhead on the reference cell varied 6.8% between the
    two windows while its control wall varied 1.2%. So bucket 3 is reportable as
    row-scaled and second-largest, not as a number; bucket 4 and buckets 1+2 are
    reportable as numbers.

    Buckets 1 and 2 are reported fused, and that is a limit, not an omission

    The window starts at sliceStartEpoch — the moment the main-thread iframe's Blob
    script URL is assigned, before the browser loads, parses and evaluates it.
    The only framework-agnostic event inside it is the first host call, because
    the host boundary is the only thing this harness owns on both sides. Bundle
    evaluation and framework boot both finish before that call, and separating them
    needs a probe inside the framework — which would make the two cells
    non-comparable, the one thing this window exists to avoid.

    What matters is that the fused bucket is small and constant: 8–9 ms at 10k,
    12–14 ms at 1k. Splitting it further can win at most ~10 ms at any scale.

    Three independent controls agree it is constant:

    • the rows-0 shell startup window, which paints no rows at all, reports
      start_delay 19.1 ms (octane) and 6.5 ms (react-first-screen) — the same
      values the FCP@10k window reports;
    • bundle bytes are constant with rows: octane's lepusCode section is
      254,402 B shipping and 254,537 B at rows-10000 (+135 B for 10,000
      pre-populated rows
      ); react-first-screen's is 48,463 → 48,755 (+292 B);
    • the bucket does not move between 1k and 10k in either cell.

    And the correlate #247 asked for is answered, in the direction that retires it.
    Are we simply shipping and parsing more? Yes, by a lot — and it is nearly free:

    section octane rows-10000 react-first-screen rows-10000 ratio
    lepusCode (MTS) 254,537 48,755 5.22×
    manifest (BTS) 292,553 49,095 5.96×
    styleInfo 5,902 2,989 1.97×

    Octane ships 5–6× ReactLynx's bytecode in both sections and pays 9 ms for
    it at the first host call. Bundle volume is not where this gap is. That is a
    verdict on bucket 1 that the L5 repayment work (#103) should also hear.

    Where the gap is, and the mechanism

    The counts are exact — zero spread across all five repetitions, not medians
    of noise. Host calls, FCP@10,000:

    host call octane react-first-screen delta per row
    __GetElementUniqueID 70,042 1 +70,041 +7.0
    __AppendElement 70,041 60,028 +10,013 +1.0
    __SetAttribute 40,028 30,013 +10,015 +1.0
    __CreateRawText 30,013 20,000 +10,013 +1.0
    __CreateText 30,013 30,013 0 0
    __SetClasses 40,028 40,028 0 0
    __AddEvent 20,012 20,012 0 0
    __CreateView 10,015 10,015 0 0
    __FlushElementTree 2 1 +1 —
    total 310,195 210,114 +100,081 +10.0

    The internal control that makes this legible. Each cell's first screen
    against its own create path — same tree, same cell, same window:

    cell create@10k FCP@10k first-screen tax
    react-first-screen 210,001 210,114 +113 calls (+0.01/row)
    octane 200,001 310,195 +110,194 calls (+11.0/row)

    React's first screen is its create path. It pays essentially nothing for
    being a first screen. Octane's is a different path costing 55% more host calls
    than its own create path does to build the same tree, and the whole excess is
    __GetElementUniqueID (7/row, the adoption read), __SetAttribute (4/row), and
    one extra flush.

    Three obvious hypotheses die here, on direct observation. These are the
    harness's own NO-GO verdicts in c247-o1-boundary.md:

    • Flush cadence — NO-GO, −12.4 ms. Octane flushes twice for 136–158 ms;
      react-first-screen flushes once for 167–176 ms. React's single flush
      costs more than Octane's two.
    • Per-element stream shape — NO-GO, −132.5 ms. Octane's FCP ops run at
      0.0023 ms/op against react's 0.0027. Octane's calls are cheaper. It makes
      48% more of them.
    • First-paint scheduling — NO-GO at 10k, 9.4 ms / 2.0%. This is buckets 1+2
      again, arrived at independently.

    The harness authorises two owners at 10k: publication op count, GO at 271.9 ms
    (57.1%)
    — 310,195 vs 210,114 calls priced at the reference's own rate — and
    off-boundary, GO at 298.5 ms (62.7%). They overlap by construction, since the
    first is a projection at the reference rate and the second is the remainder.

    And the largest single structural difference is cheap where we can see it.
    papi_read is the __GetElementUniqueID bucket: 20.6–20.7 ms for 70,042
    calls
    , about 5% of the gap. The adoption read is nearly free at the host
    boundary
    . So whatever the two-arm agreement work costs, it costs in the
    framework script around the calls — which is bucket 4, and which this harness can
    only see as a remainder.

    Bucket 4 is a remainder. Saying so is part of the answer.

    off_boundary is everything in the window that is not a host call and not the
    start delay: framework script between the calls, the browser's own
    style/layout/paint, and the observer-frame delay. It is exclusive and it is
    named, but it is arithmetic, not a measurement. 63–83% of the gap landing
    there is a statement about where to instrument next, not a mechanism claim — and
    it is the same place #183 arrived at for the program cell's residue by a
    different route.

    Under #230: every count above and the bucket sizes are verified; "bucket 4 is
    framework script rather than browser paint" is not claimed in either
    direction.

    #247 asked for Cause A to be measured in this window, not guessed

    Done — same cells, same harness bytes, on the #250 head:

    node stages/papi-run.mjs --cells octane,react-first-screen \
      --scales 1000,10000 --reps 5 --label c247-o1-causea

    The result is parity. After Cause A, Octane's first screen issues the same
    count of every element-creating and tree-shaping call as ReactLynx's. Zero spread
    across all five repetitions on every row:

    host call, FCP@10,000 octane (new-lynx) octane (+ Cause A) react-first-screen
    __CreateView 10,015 10,015 10,015
    __CreateText 30,013 30,013 30,013
    __CreateRawText 30,013 20,000 20,000
    __AppendElement 70,041 60,028 60,028
    __SetClasses 40,028 40,028 40,028
    __AddEvent 20,012 20,012 20,012
    __SetAttribute 40,028 50,041 30,013
    __GetElementUniqueID 70,042 60,029 1
    __FlushElementTree 2 2 1
    total 310,195 290,169 210,114
    gap to react +100,081 +80,055 —

    Six of the nine rows are now identical to React's. The entire residual is
    three things: the adoption read (6/row against React's one call in total), two
    extra attribute writes per row, and one extra flush. Nothing about the elements
    differs any more.

    Its wall-clock effect is not resolvable by this method, and I am not claiming
    one.
    Cause A's window puts the ratio at 1.441× @10k. The two new-lynx windows
    put the same unchanged code at 1.411× and 1.452× — a spread of 0.041, four
    times the 0.011 that Cause A appears to move. The Cause A reading sits inside the
    same-code spread.

    What is exact is the count: −20,026 host calls at FCP@10k, −2.0 per row,
    −6.5% of the first screen's calls
    , and exact parity with React on every create
    and every append. At the FCP window's reference rate (0.0027 ms/op) that projects
    to ~54 ms of host self time — a projection using this harness's own
    publication_op_count formula, not an observation.

    What this constrains in Order 2

    Order 2 is per-bucket verdicts and is not in this comment, but Order 1's numbers
    already fix three things:

    Does this change the sequence? — #230 protocol

    No for the E-train; yes for Order 2's shape, and yes for one prerequisite.

    E2 → E3 → E1 stands. Nothing here reorders it and nothing here is a new E-train
    item.

    What changes:

    1. Order 2 cannot be four verdicts. Two buckets can be ruled today (1+2
      bounded; 3 already-owned). Bucket 4 cannot, because most of the gap is in a
      remainder. A bucket-4 verdict requires an instrumentation slice first —
      new work Order 2's framing did not anticipate, and it is now the critical path
      for this issue.
    2. Attribute the 1.6× web-startup gap to ReactLynx before deciding whether to chase it #247's oracle is checkable, and blocked behind that instrument. The oracle
      is FCP@10k ≤ 1.3× react. Measured: 1.411–1.452×. Closing it means finding
      ~110–150 ms at 10k, and 63–83% of what is available is in bucket 4. The oracle
      is not refuted; it is blocked behind the instrument, and that ordering is
      new.
    3. "Stop reading ids" is not a free 200 ms. The adoption read is the largest
      structural difference in the first screen — 7 calls/row React does not make at
      all — and it costs ~20.6 ms at the host boundary. Anyone opening a slice
      against adoption must price the script around the read, not the read.
    4. The FCP ratio self-certified, and its resolution is now known. Two windows
      of identical code give ±0.04 on the 10k ratio. Any future claim of a
      first-screen improvement smaller than that needs more windows, not a louder
      assertion — and that bound is what disqualified my own Cause A wall-clock
      reading above.

    None of this touches E3 or E1's design, so the train is unchanged.


    Generated by Claude Code

  2. Huxpro commented on Aug 31, 2026

    @Huxpro
    OwnerAuthor

    Order 2 prerequisite — bucket 4 now has a split, and a verdict

    PR #254 (draft, stacked on #251). Records checked in as stages/results/c247-o2-*; procedure in docs/measurement/fcp-attribution.md.

    The instrument existed. That is the first finding.

    Order 1 called the bucket-4 split "new work Order 2's framing did not anticipate" and made it this issue's critical path. It is neither new nor work: papi-run.mjs has split off_boundary by first-screen phase since #163 C6, for any run whose cell list includes octane-profile. The Order-1 run was --cells octane,react,react-first-screen, so no split was produced — and the two prior records that do carry one (c163-c6-phase-boundary.md, papi-firstscreen-boundary.md) have no reference in the window, which is exactly what made them unusable for this question.

    So the slice was: run the existing instrument in a window that also carries react-first-screen.

    node stages/papi-run.mjs --cells octane,octane-profile,react-first-screen \
      --scales 1000,10000 --reps 5 --label c247-o2-bucket4

    Two such windows, same code, so the split has its own error bar rather than my assurance.

    The split, @10,000 rows

    Medians of 5. Both same-code windows shown.

    A B spread
    Octane off_boundary, shipping cell 558.5 543.8 2.7%
    Octane off_boundary, profiled cell 599.9 594.5 0.9%
    → render 91.8 85.7 6.9%
    → publish 362.1 349.6 3.5%
    → capture 53.3 50.9 4.6%
    → announce 0.0 0.0 —
    → Octane's own first-screen script 505.0 516.3 2.2%
    → residue — web-core script and the browser frame 94.9 92.7 2.3%
    react-first-screen off_boundary — its whole bucket 4 223.3 237.9 6.5%

    render crosses the host boundary not at all, so its whole span is framework script by construction rather than by subtraction. The profile build's first-screen wall on the uninstrumented control pages is 1288.4 ms against the shipping cell's 1280.8 in window A (+0.6%), which is the whole licence for reading the split as the shipping build's; the two builds are never divided into a ratio.

    Bucket 4 is Octane's own script, not the platform. 84.2% and 86.8% of it, in two windows.

    The comparison the Order asked for

    Order 1 set the rule: the vendored reference carries no phase marker and cannot be given one, so Octane's split is argued against react's bucket-4 total, never against its parts.

    Doing exactly that:

    A B
    Octane's first-screen script 505.0 516.3
    react-first-screen's entire bucket 4 223.3 237.9
    excess +281.7 +278.4

    1.2% apart — the steadiest quantity in the whole measurement, steadier than either side of it. It subtracts nothing on the reference side, so it holds however react's own remainder divides internally: even if react's bucket 4 were pure platform with no react script in it at all, Octane's own script would still be 2.26× and 2.17× the whole of it.

    The other direction is a bound rather than a measurement, so I state it as one: Octane's residue is 94.9 / 92.7 ms while painting ~1.4× the reference's elements, which puts react's platform share at or below that and its own script at ≥ ~130 ms of its 223–238. Under #230 that is a hypothesis — it assumes more elements cost more browser time — and the verdict above does not use it.

    The record's own contract also notes the residue is an upper bound on the platform's share, not a measurement: framework script inside the window but outside the four phases lands there. That direction flatters Octane, so 505.0 is a floor on the framework's share.

    Which parts scale with rows

    ×10 rows, 1,000 → 10,000, both windows:

    A B
    render ×5.85 ×4.81
    publish ×8.07 ×8.04
    capture ×8.60 ×8.93
    Octane's first-screen script ×7.56 ×7.54
    residue ×7.97 ×8.06
    react's whole bucket 4 ×7.30 ×8.41

    publish and capture are cleanly row-scaled. render is the one sub-linear term — part of it is a fixed cost 10,000 rows does not enlarge. The framework share of the remainder is stable across the decade too: 85.4% / 85.9% at 1k against 84.2% / 86.8% at 10k.

    One level further: which functions

    stages/mts-profile.mjs CPU-profiles the hidden main-thread realm and names frames by string literals the minifier cannot rename. Different window, sampled, no uninstrumented control beside it — so what transfers is the shape, not the milliseconds. Nothing below is added to or subtracted from the table above.

    node stages/mts-profile.mjs --rows 10000 --reps 5 --cells octane, medians of 5:

    main-thread script ms of all frames
    applier walk — visit 95.7, pushChildren 15.7 111.2 28.3%
    host record building — cloneProps 27.7, createHandle 16.9, textValue 16.7, planLynxHostPropPatch 11.7 83.2 21.2%
    renderer pre-passes 42.5 10.8%
    applier entry and pre-walk — applyLynxFirstScreenDirect 33.0 36.9 9.4%
    first tree capture 31.5 8.0%
    event bookkeeping 20.7 5.3%
    first-screen entry 8.4 2.1%
    element factory dispatch 2.8 0.7%
    papi facade 2.2 0.6%
    named total 341.2 87.0%
    unnamed by the probe table 51.1 13.0%
    main-thread script, all frames 392.4 100%

    The 13.0% names nobody and is reported as such.

    The two instruments agree on the shape, which is the only cross-check available. Grouping the profiler's buckets by the phase that runs them: publish-side functions 257.0 ms (75.3% of the named total), render-side 50.9 (14.9%), capture 31.5 (9.2%) — against the boundary instrument's 71.7% / 18.2% / 10.6%. Same ordering, same rough shares, two independent instruments. Their totals differ (392.4 against 505.0) and are not reconciled: different windows, one of them sampled.

    A single function, visit, is 95.7 ms — 28.0% of everything the probe table names.

    Two instrument defects found on the way, both now fixed in #254

    Reporting these because a measurement campaign that silently loses its instruments produces records that read exactly like correct ones.

    1. mts-profile.mjs was refusing every run. It identified the profiled script by patching URL.createObjectURL and keeping what the page minted. That list came back holding one blob URL, and it was not the one the profiled frames ran from, so every run died on the profile named none. Verified by direct observation; the likely cause is that Web Core mints inside a worker and addInitScript reaches frames but not workers, which is a hypothesis about Web Core and does not need settling — the script is now read from the about:srcdoc realm's own <script src="blob:…">, which is the document being attributed rather than a guess from another realm's traffic.

    2. applier walk read 0.0 ms while its two functions were the run's two largest unnamed frames — 93.5 and 18.0 ms. Its probe was physicalParent, taken from a visit that destructured its frame at the top; the dense-span fast path now runs before that destructuring and pushed the probe past the 160-character window. Two probes replace it, one per function. Naming those frames moves the unnamed share from 41.4% to 13.0%, and the repaired bucket reads 111.2 ms against the 113.7 ms the pre-drift record mts-profile-10000.md measured — a number the repair had to reproduce and was not fitted to. That is also the evidence no earlier record was affected: the drift is newer than 2026-08-25.

    Neither would have gone red anywhere. No workflow runs test:stages, and pnpm test does not fan out to it — the stage harnesses have no CI coverage at all. That is worth its own issue and I have not widened this diff into one.

    Order 2 verdict for bucket 4

    Fixable, with the mechanism named at phase granularity and the largest term named at function granularity.

    • Owner: Octane's own first-screen script, ≥505 ms of a ~600 ms remainder at 10k, against a reference whose entire remainder is 223–238 ms.
    • Largest term: publish's off-boundary time, 362.1 / 349.6 ms — 72% / 68% of the framework's share. Inside it the profiler puts the applier's tree walk first (visit alone at 28% of the named script) and host-record building second (cloneProps its largest single site).
    • Not the platform. The residue is 15.8% / 15.6%, and it is an upper bound on the platform's share rather than a measurement of it.
    • Not the element bill. Octane paints 7 elements per benchmark row where Vue paints 4 — audit the row's element diet; it is also the ART-ceiling denominator #242 Cause A already took the create and append counts to exact parity, and papi_read prices the adoption read at 20.6–20.7 ms. This is script around calls that are already at parity — which is what Order 1's third constraint predicted.

    The binding constraint is now the oracle, not the attribution

    #247's oracle is FCP@10k ≤ 1.3× react. In these two windows the control-page ratio is 1.478× and 1.369× — a spread of 0.109, wider than the ±0.04 Order 1 established for a two-cell interleave. A three-cell interleave is not the same window and is the obvious suspect; it is not established. Closing the oracle means finding 62–155 ms depending on which window you believe, against 505 ms of framework script that is now named.

    So the attribution is no longer the blocker; a deterministic oracle for framework script is. Host-call counts cannot serve — they are already at parity after Cause A, which is precisely why the remaining gap is invisible to them. Any bucket-4 slice needs either a counter it can move deterministically (walk steps, records built, props cloned) or more windows than a wall clock at this resolution can afford. I would put that in front of any implementation slice.

    Does this change the sequence? — #230 protocol

    No for the E-train. Yes for this issue, in the direction that unblocks it, and yes for one new prerequisite.

    E2 → E3 → E1 stands. Nothing here is an E-train item and nothing here reorders one.

    What changes:

    1. The bucket-4 instrumentation slice is done and was smaller than Order 1 sized it. It was a run, not a build. Order 2 can now issue four verdicts instead of three, and Attribute the 1.6× web-startup gap to ReactLynx before deciding whether to chase it #247's oracle is no longer "blocked behind the instrument".
    2. The blocker moved from attribution to measurability. Order 1 said the oracle was blocked behind an instrument; it is now blocked behind a deterministic oracle for script cost, which is new work nothing has scoped. That is a real prerequisite for any fix slice and I would not open one without it.
    3. The bucket-4 delta is less stable than Order 1 reported. 335.2 and 305.9 ms here against 298.5 and 291.4 there — a 15% spread against those two windows' mutual 2%. The reference side is steady across all four (222.7 / 238.6 / 223.3 / 237.9), so the widening is Octane's. The verdict above deliberately does not rest on the delta; it rests on 505.0 vs 223.3, which is 1.2% stable across windows.
    4. stages/* has no CI coverage, and two instruments had rotted. Not an ordering change for this issue, but it is a standing risk to every campaign that reads from that directory, and The create residual: attribute it, tax-test it, then extend compiled programs to steady-state mounts (E-train) #230's self-certification rule has nothing to say about an instrument that stopped running.

    Nothing here touches E3 or E1's design, so the train is unchanged.


    Generated by Claude Code

  3. Huxpro commented on Aug 31, 2026

    @Huxpro
    OwnerAuthor

    Order 1's bucket-4 owner, from the instrument rather than from the remainder

    Order 1 put 63–83% of the FCP@10k gap in off_boundary and refused to name an owner, because a named remainder nominates nobody. #254 built the instrument that observes inside it. This is the attribution it produces.

    The owner is publish. Not nominated — measured, by the framework's own first-screen phase marker, with the boundary probe attributing each host call to the phase that issued it.

    At 10,000 rows, both windows (c247-o2-bucket4-*, c247-o2-bucket4-b-*)

    phase window A window B share of Octane's own bucket 4 share of the FCP gap two-window spread of that share
    render 91.8 85.7 15.3% / 14.4% 0.201 / 0.191 0.010
    publish 362.1 349.6 60.4% / 58.8% 0.792 / 0.777 0.015
    capture 53.3 50.9 8.9% / 8.6% 0.117 / 0.113 0.003
    announce 0.0 0.0 0.0% 0.000 0.000
    framework total 505.0 516.3 84.2% / 86.8% — —
    residue — web-core script and the browser frame 94.9 92.7 15.8% / 15.6% 0.208 / 0.206 0.002

    Every share above is against the denominator §3 of fcp-attribution.md names — median(octane fcp total) − median(reference fcp total) — and every one of them replicates across the two windows inside the ±0.04 line, publish at 0.015.

    Three statements that survive:

    1. publish alone is larger than the reference's entire bucket 4. 362.1 against 223.3, and 349.6 against 237.9 — an excess of +138.8 and +111.7 ms. That subtracts nothing on the reference side, so it holds however React's own remainder divides internally.
    2. publish is a per-row cost. Across a 10× row increase it scales ×8.06 and ×8.04 — the two windows agreeing to 0.02 on the exponent. capture also scales per-row (×8.6, ×8.9). render does not: ×5.85 and ×4.81, sub-linear and not even stable between windows.
    3. The residue is bounded and small. 15.8% and 15.6% of Octane's own bucket 4, and that is an upper bound on the platform's share: framework script before the first host call is start_delay, a separate term, so what can still land in the residue is framework script inside the window but outside the four phases. The direction flatters Octane, which makes the framework total a floor.

    Two things I will not claim. At 1,000 rows render's gap share spreads 0.041 across the two windows and does not pass the line; only the 10,000-row row above does. And the framework total's raw share of the gap (1.105 / 1.148) spreads 0.043 — also outside, and in any case not a licensed comparison, because it subtracts nothing on the reference side. The excess over the reference's whole bucket 4 is the licensed form, and it reads 0.616 / 0.619, spread 0.003.

    Inside publish, which functions own it

    Different instrument, different window (c247-o2-publish-10000), so only the ordering transfers — a sampling profiler perturbs the page and that run carries no uninstrumented control. Its milliseconds are not the boundary instrument's and must not be divided into them. Main-thread script self time at 10,000 rows, 392.4 ms across all frames:

    bucket ms largest sites
    applier walk 111.2 visit 95.7, pushChildren 15.7
    host record building 83.2 cloneProps 27.7, createHandle 16.9, textValue 16.7, planLynxHostPropPatch 11.7
    renderer pre-passes 42.5 16 sites, largest recursive prop freeze 10.3, TEMPLATE_ENV.h 9.9
    applier entry and pre-walk 36.9 applyLynxFirstScreenDirect 33.0
    first tree capture 31.5
    event bookkeeping 20.7 nativeEventMap 8.5
    unnamed by the probe table 51.1

    The probe repair in #254 is what makes this readable: before it, applier walk read 0.0 while visit and pushChildren sat unnamed at 93.5 and 18.0 ms.

    The cut the attribution points at, and why it is the cheapest one

    host record building — 83.2 ms, second-largest bucket — is not painting anything. The first screen is painted by the direct applier (applyLynxFirstScreenDirect). The records are built for a different consumer, and host-driver.ts:5035 says so in as many words:

    The rendered records carry the main graph's raw props, where a main-thread: event prop is still a tagged callable. Records feed captureLynxFirstTree, whose snapshot crosses the ContextProxy wire, so the stored props must be the same wire-safe clones the staged applier journals

    So per host node, on the critical path to first paint, the walk pays cloneProps + planLynxHostPropPatch + createHandle + generation bookkeeping to build a record that nothing needs until the background asks for the tree. That is the same cost #68 (capture deferral) was opened against, now with observed attribution behind it rather than a hypothesis.

    And there is a narrower version already in the tree. The steady-state mount-template-run path memoizes both the clone and the patch on the props object's identity (host-driver.ts:7323):

    const cachedProps = prepareStaticHostProps(type, descriptor.props, label);
    const props = cachedProps?.props ?? cloneProps(descriptor.props, label);
    const patch = cachedProps?.patch ?? (…planLynxHostPropPatch…);

    The first-screen walk at :5040 does not — it calls cloneProps and planLynxHostPropPatch unconditionally, per node. Two paths, same work, one of them already memoized.

    I am not claiming that as a win yet, because prepareStaticHostProps is deliberately narrow: it memoizes only a frozen props object with zero or one key, and that key must be class/className carrying a string. Whether first-screen host nodes qualify is an empirical question about what the main renderer hands the walk, not something to reason out from the shape of a table row. The sizing measurement — what fraction of first-screen host nodes are memo-eligible — runs next, and if the answer is "few", this cut is dead and the capture deferral in #68 is the one left standing.

    That ordering is deliberate, and it is the same discipline that just retired E1 on #246: size the cut before building it, because the cheap measurement is the one that can say no.

    Standing

    Order 1's refusal is now discharged: bucket 4 has an observed owner, publish, carrying 0.79 of the FCP gap at 10,000 rows with a two-window spread of 0.015. #247's ≤1.3× oracle is unaffected by this comment — nothing here changes a wall clock, it only says where the wall clock goes.

    CI is still wedged, so #254 carries no check run; the numbers above come from checked-in evidence and the local stage suite (191 pass, 0 fail).


    Generated by Claude Code

  4. Huxpro commented on Aug 31, 2026

    @Huxpro
    OwnerAuthor

    Sizing the cut: the cheap version is dead, and the census says so exactly

    Following the attribution above, I said the memo cut needed sizing before building because prepareStaticHostProps is narrow, and that "if the answer is few, this cut is dead." The census ran. PR #264.

    The answer is not "few". It is zero, and for a reason I did not anticipate:

    1,000 rows 10,000 rows
    first-screen host nodes 6,028 60,028
    memo-eligible 3,015 (50.0%) 30,015 (50.0%)
    not frozen / non-class key / non-string value 0 / 0 / 0 0 / 0 / 0
    distinct props objects, for the 40,028 non-text nodes 4,028 40,028
    → identity-keyed hit rate 0.0000 0.0000

    Half of all first-screen hosts pass every structural test prepareStaticHostProps applies — frozen, one key, class/className, string value, with zero misses for any reason other than being #text or carrying more than one key. But the memo is keyed on the props object's identity, and the renderer allocates a fresh bag per node: 40,028 non-text nodes against 40,028 distinct objects. Pointing the first-screen walk at that memo would buy a WeakMap lookup per node in order to miss every time.

    The same census says what would have worked. Those 30,015 eligible nodes resolve to 7 distinct (type, class) pairs — seven, at 1,000 rows and at 10,000 alike, because the class strings come from the template rather than from the data. A value-keyed memo hits 0.9998. The clone and the patch are both pure functions of that pair, so it is a correct cut, not just a cheap one.

    And it still should not be built

    • The class-only half are the cheapest clones in the bucket — one key, no recursion — so the addressable share of cloneProps 27.7 ms + planLynxHostPropPatch 11.7 ms is well under half of 39.4 ms.
    • ±0.04 on the FCP@10k ratio is about ±42 ms of Octane wall at this scale. A win of that size cannot be claimed from wall clock, and fcp-attribution.md is explicit that a claim under the line needs more windows.
    • There is no count oracle to fall back on: the change issues no different host calls.

    One hypothesis survives and is labelled as one: 30,015 allocations and freezes replaced by 7 cache entries could have GC knock-on larger than the direct self time. Nothing here measures that, and it is the only remaining argument for building it.

    Where that leaves bucket 4

    The cut that can clear the line is structural, not a shave. host record building is 83.2 ms — the whole bucket, more than twice the clone-and-patch pair — and none of it paints anything; host-driver.ts:5035 says the records exist to feed captureLynxFirstTree. Taking that off the critical path is #68, which now has observed attribution behind it instead of a hypothesis.

    So B-line tonight ends with bucket 4 attributed and its cheapest cut priced and declined, rather than with a change that could not have been claimed. Same discipline that retired E1 on #246 a few hours ago, and the same shape of answer: the cheap measurement is the one that can say no.

    CI is still wedged; #264 and #254 are drafts with no check run.


    Generated by Claude Code

  5. Huxpro commented on Aug 31, 2026

    @Huxpro
    OwnerAuthor

    Owner directive — the FCP line moves to implementation

    #254 did its job: bucket 4 has an observed owner — publish, 0.79 of the octane-minus-reference gap at 10,000 rows, two-window spread 0.015, comfortably above the ±0.04 resolution. That is no longer an attribution problem; it is an implementation target sitting in Octane's own first-screen publication path.

    The directive

    Implement the publish-path cut to completion. The first screen already holds the compiled program and the direct applier; publish is the remaining interpreted/bookkeeping span between render and the FCP predicate. Drive it the way the rest of this campaign drove the first screen: extend the compiled/direct path through publish until the interpreted remainder is gone, using #254's phase segmentation as the working instrument to see where each cut lands — locally, iteratively, as a build tool, not as a merge gate.

    Operating mode, same as the E1 directive on #246:

    • No mid-flight ruling round-trips. Where a choice arises, take the one consistent with the first-screen precedent and the existing rulings, and note it in the PR body. test(bench): size the first-screen prop memo before building it, and refute the cheap version #264's census already settled the memo question (identity-keyed: dead at 0.0000; value-keyed: declined) — do not revisit it; the cut is structural, not a cache.
    • No performance oracle gates the merge. The ≤1.3× oracle and the ±0.04 claim discipline apply to claims, not to whether the implementation lands. Interim web-lane numbers are indicative only; the finished implementation goes to the device round for the full FCP comparison and regression pass. A cut that shows nothing on V8 but is structurally sound still lands — the target engine has no JIT to hide interpretation behind.
    • Correctness gates stay in full force: first screens byte-identical between the old and new publish path (adoption, ids, events, refs, focus, hydration handover), the repo's suites green, decline paths for anything the direct path cannot carry.

    Deliver as draft PRs on new-lynx for gating. Gate reviews for correctness; the speed verdict is the device round's, at the end.


    Generated by Claude Code

  6. Huxpro commented on Sep 1, 2026

    @Huxpro
    OwnerAuthor

    publish cut to completion: three landed, and what the remainder actually is

    Per the directive — extend the compiled/direct path through publish until the
    interpreted remainder is gone, #254's segmentation as a local build tool, no
    performance oracle gating the merge, correctness in full force. All draft, all
    into new-lynx.

    PR cut web lane
    #270 the first screen stops minting a public handle and a selector string per host; the compact record carries root/id/generation directly non-result, reported as one; visit self 132.7 → 97.4
    #271 the direct first screen adopts its frozen prop bag instead of copying it 475.5 → 337.9 ms (−28.9%), 4/4 rounds, non-overlapping
    #272 a create stops diffing against nothing: the seven previous-side derivations become constants non-result, reported as one; ~160,000 calls and 40,002 allocations removed

    One more was built in full and declined on its own evidence — fusing
    firstScreenTreeHasList into the ref/ceiling pre-walk. It passed 773 lynx
    tests with all five deliberate breaks red, and then measured 310.1 → 333.7
    median-of-medians, three of four rounds favouring base. Reading the code back
    explained it: the deleted scan's per-node comparisons relocate into the fused
    loop rather than disappearing. A cut that relocates work rather than removing
    it does not earn the ordering change it required
    — and that became the rule
    the rest of this campaign was held to. Full table on #271.

    Where publish stands now

    Re-profiled on the #271 head, 7 screens at 10,000 rows, self time:

    1199.3  (garbage collector)
     776.9  visit
     550.7  captureLynxFirstTree          ← capture, not publish
     308.0  applyLynxFirstScreenDirect
     200.4  snapshotFirstTreeValue        ← capture
     167.5  snapshotFirstTreeProps        ← capture
     159.5  (anonymous, describe's map)   ← capture
     156.3  emitHostNode
     124.9  pushChildren
     120.6  planLynxHostPropPatch         ← taken by #272
      94.1  nativeEventMap
      65.1  firstScreenTreeHasList        ← built, declined
      61.1  adoptFirstScreenProps
      59.0  installNativeEvent
    

    The three remaining publish-internal items, and why none is a cut

    Each was investigated with a census rather than left as a guess, so the next
    reader does not re-derive them.

    1 — 20,000 single-entry event Maps per screen. Census of the direct first
    screen at 10,000 rows:

    installNativeEvent 20000   nativeEventMap 20000   nativeEventMap misses 20000
    

    Every one of the 20,000 calls is a miss, so every one allocates a Map to hold
    exactly one entry, and state.nativeEvents grows to 20,000 entries. That is a
    real allocation finding against a profile whose largest single frame is the
    collector — but it is a change to the representation of the container's event
    journal (Map<Node, Map<string, Registration>>), read at ~25 sites including
    adoption handoff, terminal cleanup, incrementalCompact, dispatch resolution
    and two completeness gates. Proving that byte-identical across adoption,
    teardown and hydration handover is a design pass, not a cut, so it is not being
    bolted onto this stack.

    2 — the event token's validation cannot be removed, only relocated. The
    compact path uses encodePrevalidatedLynxNativeEventToken because a frozen
    template program was checked at prepare time. The direct path has no equivalent:
    applyLynxFirstScreenDirect validates envelope.renderer and envelope.version
    on arrival, so the envelope is checked, not trusted, and its 20,000 listener
    ids and priorities are not proved anywhere else. Hoisting the assertions into
    the pre-walk, or into one pass over the flat envelope.events, runs the same
    100,000 assertion calls in a different loop. By the rule the declined cut
    established, that is not a cut. Landing it would mean weakening a check, which
    the correctness gate forbids.

    3 — state.generations.set(id, 1), 60,002 writes of one repeated value.
    implicitInitialGenerations already exists for exactly this on the compact path,
    but turning it on for the direct first screen disables a later
    incrementalCompact mount on the same container. A behaviour trade, not a free
    cut, and the lane cannot price it (321.9 against a 315.7 base — inside the
    noise). Belongs to the device round.

    The larger fish is no longer in publish

    captureLynxFirstTree plus the three snapshotFirstTree* helpers and
    describe's per-host map now total 1148 ms over 7 screens — about 164 ms per
    screen
    , comparable to publish itself and larger than everything left inside
    it. Capture is inside the FCP window for the same reason publish is (JS blocks
    paint), so deferring it past paint removes it from the window outright rather
    than trimming it. That is #68's territory under #163/#148, not this issue's, and
    it is where the next order of magnitude is.

    Discipline notes

    Web-lane milliseconds are indicative only, and two of the three landed cuts show
    nothing on V8 — expected, and not a blocker per the directive, since the target
    engine has no JIT to hide interpretation behind. What each PR claims instead is
    exact: allocation and call counts from a local census instrument, which is not
    part of any diff. Both #270's and #271's ablation tables carry an explicit
    caveat that a single run per arm is an ordering, not an effect size — this
    campaign has a case that proves it, where the same change read −112.3 ms in
    ablation and −11.5 ms under interleaved A/B.

    Every PR answers the sequence question, and none changes the ABI, the wire, or
    the render → publish → capture → announce boundary.


    Generated by Claude Code

  7. Huxpro commented on Sep 2, 2026

    @Huxpro
    OwnerAuthor

    Owner directive — next FCP chapter: move capture out of the FCP window

    The publish report above located the next order of magnitude: captureLynxFirstTree + the three snapshotFirstTree* helpers + describe's per-host map total ~164 ms per screen at 10,000 rows — comparable to publish itself and larger than anything left inside it. Capture sits in the FCP window only because JS blocks paint; it is not needed for the paint. Deferring it past first paint removes the whole span from the window instead of trimming it.

    Implement the capture deferral to completion, same operating mode as the two directives above (implement-first, no mid-flight ruling round-trips, no performance oracle gating the merge, correctness in full force):

    Draft PRs on new-lynx for gating; gate reviews correctness only; the FCP verdict comes from the device round.


    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