Repository navigation
perf: bound the Element PAPI floor for per-row main-thread materialization - #748
Merged
Merged
Conversation
…ation Add a speed-of-light probe that materializes the exact 10,000-row table shape with a bare public Element PAPI loop in the same main-thread realm as the Lynx receiver, interleaved AB/BA with octane control/profile create cells, and record the measured floor: - papi_element_creation is 99.0% platform floor (collapsible 0.5% of the create wall) - mt_apply_other is 84.7% floor-equivalent (collapsible 4.6%) - chunked vs single flush makes no difference All three sub-owner candidates from the roadmap fail the >=10% owner gate for per-element MTS machinery on the web harness.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Bugbot Autofix is ON, but it could not run because the branch was deleted or merged before autofix could start.
Reviewed by Cursor Bugbot for commit 30a2ae3. Configure here.
11 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
benchmarks/lynx-table/stages/papi-floor.mjs: a speed-of-light ElementPAPI probe that bounds the platform floor for materializing the exact
10,000-row table shape (70k host elements) with a bare public-PAPI loop in
the same main-thread realm where Octane's receiver runs
settle so create attribution excludes first-screen work
stages/results/papi-floor-10000.{json,md}Why
#49 (roadmap item 1 of the Huxpro#51 umbrella) requires re-confirming a
≥10% owner inside the measured
papi_element_creation/mt_apply_otherstages before touching production code. The probe answers the prior question:
how much of those stages is irreducible host cost, and how much is collapsible
Octane-side machinery?
Measured verdict (n=5, quiet host, zero DNF; full data in stages/results/papi-floor-10000.md)
papi_element_creationis 96.4% platform floor (bare-loop 139.2 ms vsstage 144.4 ms): collapsible 5.2 ms = 1.7% of the create wall. The factory
calls themselves are host cost; only fewer calls would change it, and the
row shape (7 host nodes incl. raw-text children) is fixed by the driver
contract and native parity.
mt_apply_otheris 82.1% floor-equivalent (props+events+tree 79.0 msvs stage 96.2 ms): collapsible 17.2 ms = 5.5% of the create wall.
(⌈rows/10⌉) 583.6 ms. Same-window octane create walls: control 313.9 ms,
profile 325.0 ms.
machinery (create-with-props call fusion, flattened per-host bookkeeping,
batched insertion) fail the ≥10% owner gate on the web harness: NO-GO
for that product change; the probe ships as the reusable measurement
instrument and negative control. The featured create-cell ownership moved to
cross-cycle state accumulation, which the next stacked PR measures and
fixes.
Validation
pnpm syncpnpm format:files:checkon all six changed filesnode --test benchmarks/lynx-table/stages/*.test.mjs(9 passed)preflight enforced, zero DNF
pnpm typecheck— not run: no TypeScript surface changedpnpm test— not run: benchmark-only change; targeted stage tests passRisk / follow-ups
the floor claim is scoped to Lynx-for-Web. The one-shot foreign-task
presentation anomaly (373.7 ms vs Octane's 36.4 ms message-paced residual)
is documented as renderer scheduling and excluded from the stage-floor
comparison.
in both frame and worker realms before an operation.
the measured ownership.
Provenance
agent-authored)🤖 Generated with Claude Code
Generated by Claude Code
Note
Low Risk
Benchmark-only changes under
benchmarks/lynx-table/stages; no runtime or product code touched.Overview
Adds
stages/papi-floor.mjs, a Playwright benchmark that materializes the 10k-row table shape via bare public Element PAPI loops (with optional chunked flush) in the same main-thread realm as Octane, then compares phased timings to interleaved Octane control/profile create runs and emits JSON/Markdown with ≥10% owner-gate verdicts forpapi_element_creationandmt_apply_other.Refactor:
realmSnapshots/resetProfilesmove fromrun.mjsinto sharedprofile-realms.mjs(with a small unit test);run.mjsimports the module unchanged in behavior.Artifacts: checked-in
stages/results/papi-floor-10000.{json,md}from a quiet-host n=5 run (host-specific numbers; documents NO-GO on per-element MTS micro-optimizations at this shape).Reviewed by Cursor Bugbot for commit 6082ac5. Bugbot is set up for automated code reviews on this repo. Configure here.