Repository navigation
Open
Labels
Description
Classification
Performance/bundle enhancement for optional Lynx worklet machinery.
Evidence
- Huxpro perf(lynx): receiver diet — lazy worklet bridge, per-slice gzip gates ([lynx-perf 7]) #15 removed the no-worklet receiver's static edge to the worklet registry/call bridges and reduced its main-thread slice by about 3.6% gzip, with background bytes unchanged and no demonstrated FCP win.
- Live main after perf: bring Lynx renderer to ReactLynx parity octanejs/octane#693/perf: retain unchanged Lynx rows across transport commits octanejs/octane#696/perf: accelerate Lynx creation after first-screen adoption octanejs/octane#700 is about 18.8% larger in Web gzip and 18.4% larger in Lynx gzip than Hux2 in the neutral audit.
- A direct live-main reimplementation (
57d1a8fdc63daf7e0db0ce35b469d736d8faacb9) recovered roughly 1–3% compressed cost, but expanded reverse selectStorm@10k regressed195.2 → 234.5 ms(+20.2%). That patch is rejected, not the proposed implementation.
Evidence: live-upstream residual audit.
Hypothesis
No-worklet applications should have no static import edge to registry, call-bridge, or dispatch machinery. The old bridge-slot patch changed module layout/hot dispatch enough to move runtime performance; a correct solution needs a compiler/capability-owned cold feature boundary rather than another receiver-level indirection.
Investigation
- Attribute which worklet modules remain reachable from each production slice after perf: bring Lynx renderer to ReactLynx parity octanejs/octane#693/perf: accelerate Lynx creation after first-screen adoption octanejs/octane#700 and why
sideEffects/registration keeps them alive. - Emit or select a worklet-capable feature entry only when compiled output actually contains worklets or
useMainThreadRefcalls. - Keep the ordinary main receiver/install/dispatch path byte- and call-shape-neutral when the feature is absent.
- Preserve late chunks, mixed-version peers, first-screen worklets, thread calls, double-install diagnostics, and clean unsupported-message failures.
Acceptance
- no-worklet main slice improves at least 2% gzip in both preview and IFR fixtures; background slice is byte-identical unless an itemized reason is accepted;
- worklet-enabled fixtures retain byte/functionality parity and all thread-call/worklet tests;
- ordinary CRUD, storms, startup/FCP, memory, and teardown show no >5% adverse decision cell in forward and reverse runs;
- static source graph proves the absent feature has no import/re-export/side-effect edge;
- per-slice frozen budgets prevent the dependency from returning.
Non-goals
- No startup/FCP claim without a measured critical-path owner.
- Do not revive perf(lynx): receiver diet — lazy worklet bridge, per-slice gzip gates ([lynx-perf 7]) #15's rejected diagnostics-string or plan-unification experiments.
Provenance
- An agent authored this issue (
agent-authored).
Activity
Huxpro commentedon Aug 11, 2026
Upstream-ready implementation: octanejs#707
Acceptance evidence:
main-worklets.tsand registry/call-bridge machinery when absent; compiler routes thread helpers to the cold module only when emittedBackground exception itemization: raw program length stays exactly 271,737 bytes and semantic markers are identical. gzip changes 73,182 → 73,185 B and the encoded checksum changes only because the independently optimized main graph perturbs Rspack debug-metadata and one-character minifier locals; decoded comparison found no background source/command/semantic change. This is the issue's allowed itemized exception, documented in the PR.