Repository navigation
Conversation
`stages/run.mjs` decomposes Octane from inside Octane, so its segments stop at the Element PAPI call and everything past it lands in one `layout_flush_residual` — 60.9% of FCP@10k, and uncomparable against a framework whose internals are not instrumented. Add the other side of the same call. `@lynx-js/web-core` installs the whole Element PAPI onto the hidden main-thread script realm with a single `Object.assign` issued from the page; wrapping that one assignment observes the host boundary, so the identical instrument measures Octane, ReactLynx, and Vue vdom+IFR+ET by construction. No framework is patched, no reference bundle is rebuilt, and no featured bundle hash changes. Three page variants run interleaved: `control` (no probe), `counts` (call counts, flush cadence, and start delay with no per-call clock read) and `timed` (per-call exclusive host time). Counts-build overhead stays within the declared 1.05x ceiling on every load-bearing cell, the timed build's 1.05-1.14x is used only for shares, and the two builds' counts must agree — reported per cell as the control on that cost. Findings, frozen in stages/results/papi-*.json and papi-report.md: - Octane issues the fewest host calls per row of the three cells (20 vs ReactLynx 21, Vue 25), perfectly linear 1k to 30k, one flush each. There is no create-side deficit to attribute on this host. - Octane and ReactLynx are within 0.1% on the composed startup+create path at 10k, so the shared Web Core floor is genuinely shared. - Octane's first-screen path costs 18.8%/33.6%/45.0% more than its own post-mount path for an identical tree. `__FlushElementTree` publication owns a near-constant 27-29% of that excess across a 30x scale range. - Publication op count, first-paint scheduling, and per-element stream shape are each NO-GO: the +11 host calls per row the first screen issues cost the host less than the calls they replace. Report rendering is split from measurement, so an attribution change re-renders checked-in evidence instead of costing another measurement window. `papi-predicate-cost.mjs` records what the driver's own predicates cost, so the report can state that bound rather than leave it to be guessed. Also fix `stages/analyze.test.mjs` resolving a repo path from the process working directory, which made the package's own `test:stages` script fail from the package directory. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01UMisRkW6cGfodXwpy4kxYS
|
Correction: the "public API" blocker was overstated, and the win is now landedThe PR body says deferring the first-tree description is blocked by two On It turned out not to need loosening. The second contract — a PAPI failure
All 340 Measured, paired A/B with both bundles built side by side, alternating order,
That is on top of the prop-planning skip in Generated by Claude Code |
4b6c579 to
bbbbf3b
Compare
Summary
Closes #50.
stages/run.mjsdecomposes Octane from inside Octane, so its segments stop atthe Element PAPI call and everything past it — prop and insertion work,
__FlushElementTree, Web Core DOM publication, style/layout, observer delay —landed in one
layout_flush_residual, 60.9% of FCP@10k, uncomparable against aframework whose internals are not instrumented.
This adds the other side of the same call.
@lynx-js/web-coreinstalls the wholeElement PAPI onto the hidden main-thread script realm with a single
Object.assignissued from the page (LynxViewInstance.onPageConfigReady), sowrapping that one assignment observes the host boundary and the identical
instrument measures Octane, ReactLynx, and Vue vdom+IFR+ET by construction.
No framework is patched, no reference bundle is rebuilt, and no featured bundle
hash changes — a host-side probe needs no instrumented reference artifact at
all.
Benchmark tooling and frozen evidence only; this PR touches nothing under
packages/. The two optimizations it authorized are split out into#56, which reviews on its own without scrolling past ~21k lines of evidence
JSON.
Findings
Frozen in
stages/results/papi-*.json, decision write-up instages/results/papi-report.md. n=5 per variant per cell per scale at1k/10k/30k, fresh page per sample, zero DNF and zero null cells.
ReactLynx's 21 and Vue's 25 — perfectly linear 1k→30k (0.0% drift), one
__FlushElementTreeeach. Certified create deltas against ReactLynx: +12.8 /−12.8 / +113.1 ms. There is no create-side deficit to attribute.
startup + createpath Octane and ReactLynx land at 1,242.9 vs 1,244.5 ms at10k — 0.1% apart. The references carry no pre-populated first screen, so their
FCP@N is reported not measured, never substituted.
+18.8% / +33.6% / +45.0% for an identical tree — same driver, same bundle
family, so no cross-framework confound can enter.
__FlushElementTreepublication owns a near-constant 27.0% / 28.7% / 27.3%of that excess across a 30× scale range.
host calls per row (+55%) but they cost the host less than the ones they
replace (−9.3 / −60.8 / −119.1 ms). First-paint scheduling and per-element
stream shape are NO-GO too.
The sharpest localisation is the flush trace: between the tree reaching the DOM
and the next flush, Octane issues exactly 7 more host calls per row and nothing
else. That window is
captureLynxFirstTree, 16.7–20.1% of FCP, and everymillisecond of it is pure paint delay. #56 acts on it.
How the measurement defends itself
control(noprobe),
counts(call counts, flush cadence, start delay, with no per-callclock read) and
timed(per-call exclusive host time). Counts-build overheadstays within the declared 1.05× ceiling on every load-bearing cell; the timed
build's 1.05–1.14× is used only for shares, never for a wall-clock claim.
changed what the framework called would show up here as disagreement.
papi-run.mjswrites evidence,papi-report.mjsrenders from it, so an attribution or wording changere-renders checked-in JSON instead of costing another measurement window.
papi-predicate-cost.mjsrecords that the FCP predicate's composed-tree walk costs 54 / 720 / 2,354 ms
— large enough to plausibly own the whole excess, which is why the report
states exactly why it does not:
x.fcpsamples its timestamp before the walk,so the resolving walk is excluded by construction.
non-additivity in the delta tables, rather than presented as unexplained
physics.
Changes
web/driver-client.mjs:papiInstrumentJs({ timers })host-boundary probe;shellCount/shellAtLeastso a first screen with no rows has a paintpredicate;
x.fcpandx.armcarry epochs and a probe snapshot taken at theresolving frame;
chromiumLaunchOptions()shared by every harness.stages/papi-analyze.mjs+ tests: grouping, thewall = start_delay + Σ host groups + off_boundaryidentity, the exactcount-vs-rate delta split, scaling and overhead gates. 15 unit tests.
stages/papi-run.mjs,papi-report.mjs,papi-predicate-cost.mjs, frozenresults.
stages/analyze.test.mjs: resolve the repo path from the test file rather thanthe process working directory, which made the package's own
test:stagesfailfrom the package directory.
Validation
pnpm format:checkpnpm typecheckpnpm test— 20,670/20,919 passing. The 50 failing files fail in thissandbox before the diff: 55 raise
Chromium could not be launched(image ships Chromium 1194, Playwright pins 1228), the rest are
Port 63315 is in useand one 5 s timeout under load. Evidence in thecomment below. Nothing here is under
packages/, andvitest.config.jsdefines no project over
benchmarks/, so no vitest project can reach it.node --test benchmarks/lynx-table/stages/*.test.mjs— 23/23,from both the repo root and the package directory.
window.
Measured on 4× Intel Xeon @ 2.10GHz, Chromium 141.0.7390.37,
@lynx-js/web-core0.22.2. Absolute milliseconds are host-bound; op counts,ratios, and shares are the portable claims.
Risk / follow-ups
build-time define of the app source, and rebuilding a reference would change
the hash the featured runs recorded.
off_boundaryis named but unseparated — framework first-screen script plusthe browser's own frame after publication. Splitting it needs a framework-side
probe on the first-screen path.
Provenance
agent-authored)Generated by Claude Code