Skip to content

perf(lynx): attribute FCP and create stages - #22

Closed
Huxpro wants to merge 1 commit into
lynx/receiver-dietfrom
perf/lynx-stage-decomposition
Closed

Huxpro wants to merge 1 commit into
lynx/receiver-dietfrom
perf/lynx-stage-decomposition

Conversation

@Huxpro

@Huxpro Huxpro commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • add a reusable benchmarks/lynx-table/stages instrument for FCP@10k and create@10k decomposition
  • run a quiet-host interleaved control/profile A/B protocol (n=5) on SG1 with raw samples, medians, min-max spread, shares, and same-window ratios
  • record measured NO-GO verdicts for s2-2, s2-3, and s2-4 under the declared 10% direct-share gate

Closes #16

Why

S1 wall-clock predictions repeatedly blamed the wrong layer. This instrument observes the real PR #15 stack, including #12's instantiate receiver, and names unexposed host time as an explicit residual instead of guessing.

Changes

  • stages/run.mjs builds control/profile variants, alternates AB/BA order, collects the hidden main-thread iframe and background-worker profiles by value, and emits Markdown/JSON reports
  • stages/instrument-source.mjs applies profile-only timers during the benchmark build and restores every source byte in finally; published Lynx source is unchanged
  • deterministic tests cover n>=5 enforcement, AB scheduling, median/spread/share/ratio math, exclusive residual accounting, realm-safe parsing, production folding, exact anchors, and source restoration
  • stages/results/sg1.{md,json} commits the final SG1 session and raw samples

Validation

  • pnpm format:check
  • pnpm typecheck
  • pnpm test — completed with 1,568 files / 17,019 tests passing; 28 failures in 9 unrelated pre-existing/environment-sensitive suites (differential React-side timeouts/empty mounts, TanStack Start cross-device temp rename, website benchmark-card drift, Recharts differential drift, and two Rspeedy browser timeouts)
  • targeted tests: node --test benchmarks/lynx-table/stages/*.test.mjs — 7 passed
  • targeted tests: vitest run packages/lynx/tests — 28 files / 306 tests passed
  • node benchmarks/bench.mjs --only lynx-table --ratios --quick — 14 guards passed
  • node benchmarks/bench.mjs --only lynx-bundle-size --ratios — 6 guards passed
  • pnpm sync
  • default production bundle is byte-identical to PR perf(lynx): receiver diet — lazy worklet bridge, per-slice gzip gates ([lynx-perf 7]) #15: SHA-256 008c19a121a736da08656449c4ae401ae3c30237c3bd6e7b8f556e84b65a99ee
  • final SG1 run: node stages/run.mjs --reps 5

Measured

Host: 32× Intel Xeon Platinum 8336C @ 2.30GHz, Linux 5.15.120, Node 22.22.2, Chromium 149.0.7827.55. Fresh page per sample, AB/BA interleaving, n=5 per control/profile cell; vue-vdom create measured after each pair.

path segment median ms min-max ms share
FCP@10k MT load + parse + eval to first render 17.7 17.0-22.3 0.8%
FCP@10k plan interpretation 124.4 119.7-127.7 5.4%
FCP@10k PAPI element creation 496.8 487.2-517.0 21.7%
FCP@10k layout/flush residual 1,659.7 1,605.8-1,709.5 72.5%
create@10k BG replay 648.3 620.0-670.2 24.0%
create@10k wire clone + transfer 27.1 26.8-27.8 1.0%
create@10k MT instantiate expansion 68.6 66.3-89.1 2.5%
create@10k PAPI element creation 551.9 535.4-597.6 20.4%
create@10k layout/flush residual 1,406.1 1,386.4-1,434.9 52.0%

Raw: FCP profile 2,319.5ms vs control 2,311.3ms (1.004×); create profile 2,701.8ms vs control 2,658.0ms (1.016×) and vue-vdom 1,369.5ms (1.973×).

Risk / follow-ups

  • s2-2: NO-GO — plan interpretation is 5.4% of FCP and instantiate expansion is 2.5% of create; neither clears 10%.
  • s2-3: NO-GO from this instrument — mount/FCP provides no evidence for updater staging; point updates are already inside the roadmap target band.
  • s2-4: NO-GO — receiver load/eval plus interpretation is 6.2% of FCP and wire is 1.0% of create; neither clears 10%. The 52.0% create residual is deliberately not attributed to receiver code.
  • wall-clock values are SG1/browser-host specific; shares, same-window ratios, raw samples, and deterministic production-exclusion tests are committed.

Provenance

  • An agent produced this diff (agent-authored)

Add a reusable quiet-host stage decomposition runner with deterministic accounting tests and SG1 measurements.

Co-authored-by: TRAE CLI <[email protected]>
@Huxpro

Huxpro commented Aug 11, 2026

Copy link
Copy Markdown
Owner Author

Conclusion: close this historical stacked benchmark PR. Its reusable evidence commits have been retained on the locally rebased Hux branch, while the product assumptions were replaced by current upstream main and live research issues 43, 44, and 45.

@Huxpro Huxpro closed this Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant