Skip to content

[lynx-perf-live 6] Attribute and budget the full production Lynx bundle gap #48

Open

Description

@Huxpro

Classification

Performance/bundle roadmap for the complete production Octane Lynx artifacts. This is the parent gap that #44 covers only for optional worklet machinery.

Evidence

Exact rows-0 artifacts from upstream 9b147781c9b4ec4df053a059633978ddc0ed922a:

  • Octane Web gzip: 131,677 B; five-entry React/Vue median: 44,489 B (2.96×)
  • Octane Lynx gzip: 158,662 B; five-entry React/Vue median: 51,228 B (3.10×)
  • versus calibrated-history Hux2, current Web gzip is about 17.9% larger

These are deterministic static cells from the same vendored entry used by the featured run. Evidence: raw featured run, benchmark PR, and the live-upstream residual audit.

The rejected no-worklet experiment recovered roughly 1–3% compressed cost but regressed selectStorm@10k by 20.2%. Static shrink alone is not sufficient evidence for a merge.

Hypothesis

The full gap has multiple owners: universal runtime, Lynx protocol/host driver, validation and diagnostics, first-screen/adoption support, optional worklet/thread-call machinery, compiler-emitted programs/values, and build/runtime scaffolding. Worklet coldness is one child owner, not the umbrella answer.

Compressed bytes are non-additive. Every claimed gzip owner needs a controlled ablation or chunk-boundary experiment; raw module size alone cannot assign gzip savings.

Investigation

  1. Produce a reproducible production bundle inventory for rows-0 Web and Lynx artifacts, preserving exact source SHA, toolchain, flags, bundle hashes, raw/gzip totals, and MTS/BTS/custom sections.
  2. Attribute the reachable source graph by package/module and feature family: universal core, template programs, protocol, host driver/PAPI, first screen/adoption, events/refs/lifecycle, lists/portals, worklets/thread calls, diagnostics/validation, polyfills, app, and build wrapper.
  3. For each candidate owner, use a controlled production ablation or feature fixture to measure marginal raw/gzip cost without changing minifier/toolchain inputs.
  4. Establish frozen total and per-slice budgets in the deterministic benchmark system; add child issues only for owners worth at least 2% of a complete artifact.
  5. Audit tree-shaking boundaries, side-effect imports/re-exports, dev/prod folding, duplicate helpers/constants, optional feature entry selection, and compiler output size.
  6. Re-run runtime, startup, memory, teardown, and storm gates for every product size patch; byte savings may not alter hot call shape without measurement.

Acceptance

  • a checked-in report accounts for at least 90% of raw Web and Lynx bytes by reachable owner and measures gzip owners through controlled deltas;
  • total and per-slice raw/gzip budgets run in CI against exact production fixtures;
  • the first complete product stack reduces both Web and Lynx gzip by at least 20%, or publishes a reviewed feature-equivalence ledger explaining every remaining >2% owner;
  • no application code, reference bundle, minifier setting, source-map/debug-info policy, or measurement boundary changes to manufacture the result;
  • ordinary CRUD, create/replace/append, swap/clear, storms, startup/FCP, retained heap, worker release, worklets/thread calls, adoption, mixed-version fallback, and error diagnostics have no >5% adverse decision cell;
  • forward/reverse runtime runs and bundle hashes are included in the final report.

Non-goals

  • Do not declare React/Vue bundle parity without a feature-equivalence accounting.
  • Do not remove correctness diagnostics, production protocol checks, fallback compatibility, or public features merely to hit a byte target.
  • Do not claim startup/FCP improvement unless stage attribution places the removed bytes on the measured critical path.
  • [lynx-perf-live 2] Make optional worklet machinery genuinely cold #44 may close after its worklet boundary is correct; it does not close this umbrella issue by itself.

Provenance

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

Activity

  1. Huxpro commented on Aug 11, 2026

    @Huxpro
    OwnerAuthor

    Review update after #43–#45

    Decision: keep this umbrella issue open and add octanejs#706/octanejs#707 to its accounting ledger. octanejs#707 is a valid first child result, but it does not close or rebase the full Web/Lynx gap by itself.

    Accepted/pending ledger

    • #44 / upstream #707, final 71b758e7: no-worklet preview main gzip 76,915 -> 75,024 B (-2.46%); IFR main gzip 81,995 -> 79,980 B (-2.46%). I independently rebuilt the exact base and candidate and reproduced those four values. The complete preview/IFR bundle gzip moves 150,079 -> 148,183 B and 155,075 -> 152,968 B; background raw stays 271,737 B and its +3 B gzip delta is itemized. The production tree-shaking regression found by Bugbot is fixed with a side-effect declaration and a real Rspack production test. This remains pending until upstream merge.
    • #43 / upstream #706, final 8d8883c8: accepted runtime win, with a measured Web/Lynx gzip cost of +1.38%/+1.45%. Track this as an intentional performance-earned size tax, not as unexplained drift. It also remains pending until upstream merge.
    • #45: no bundle owner; its result reinforces that deterministic byte/message reductions require runtime gates and must not be presented as latency wins.

    The preview/IFR slice numbers above are not substitutes for this issue's rows-0 Web/Lynx totals. Compression and graph composition are non-additive, so do not subtract octanejs#707 from, or add octanejs#706 to, the historical 131,677 B / 158,662 B baseline.

    Execution plan

    1. After perf(lynx): specialize compact run teardown octanejs/octane#706 and perf(lynx): keep optional worklet runtime cold octanejs/octane#707 merge, create one exact integrated source SHA and rebuild the complete rows-0 Web/Lynx artifacts. Rebuild every ReactLynx/Vue reference entry with the same lockfile/toolchain, record all bundle hashes, and publish the new authoritative baseline. Until then, retain 9b147781 as historical only.
    2. Check in an inventory-only report and deterministic budgets before the next product patch: reachable raw bytes by package/module/feature family, main/background/custom sections, and controlled marginal gzip deltas. Account for at least 90% of raw bytes.
    3. Record perf(lynx): keep optional worklet runtime cold octanejs/octane#707 as the optional-worklet child and perf(lynx): specialize compact run teardown octanejs/octane#706 as an accepted size/performance trade. Rank the remaining owners by marginal complete-artifact gzip, opening a child only when it is worth at least 2% or has a reviewed feature-equivalence reason.
    4. Execute children one owner at a time (universal/runtime duplication, protocol/host validation, first-screen/adoption, diagnostics, compiler output/build wrapper), each as a rollback-sized patch with frozen raw/gzip budgets.
    5. For every child, run AB/BA runtime, startup, heap, teardown, worklet/thread-call, adoption, mixed-version, and error-diagnostic gates. Preserve the umbrella's 20% stack target or publish the required feature-equivalence ledger; perf(lynx): keep optional worklet runtime cold octanejs/octane#707 alone achieves neither.

    No title or acceptance rewrite is needed now. The required update is the pending ledger plus a mandatory post-merge, all-framework rebaseline.

  2. Huxpro commented on Aug 12, 2026

    @Huxpro
    OwnerAuthor

    The production bundle inventory and exact budgets are implemented on the real merged baseline.

    Upstream draft PR: octanejs#718
    Published head: c8ddb83acd8092c98ed35e3c6c06a40ba7fd7248
    Baseline: upstream main ffadd397, containing merged octanejs#706 and octanejs#707.

    Exact rows=0 inventory

    artifact raw gzip brotli
    Web bundle 485,345 132,334 100,114
    Lynx bundle 474,618 159,077 134,144
    main section 203,712 57,563 48,950
    background section 277,505 74,381 63,571

    Hashes, pre-encode main/background captures, a portable reachable-module list, and exact total/section/per-owner budgets are recorded. The inventory proportionally attributes 100% of 2,923,829 transformed reachable raw bytes.

    Largest subsystem owners (Web / Lynx attributed raw bytes):

    • compiler output: 140,155 / 137,057
    • build wrapper: 90,775 / 88,768
    • universal runtime: 78,258 / 76,528
    • host/PAPI: 37,599 / 36,768
    • protocol: 34,427 / 33,666

    The checked report also retains the controlled size ledger for octanejs#706 and the complete two-commit octanejs#707 head. Compressed results are whole-build measurements; the implementation does not claim additive per-module gzip attribution.

    Validation passed:

    • inventory total/section/owner budget gate
    • preview bundle/section budget gate
    • IFR bundle/section budget gate
    • root lynx-bundle-size suite
    • formatting and pnpm sync

    This issue remains open as the umbrella, per its execution constraint; the inventory PR establishes the calibrated decision boundary for subsequent work.

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