Skip to content

Prune unused compiled Lynx thread functions - #390

Merged
Huxpro merged 1 commit into
new-lynxfrom
huxcx/m4-web-program-scope-291
Sep 15, 2026
Merged

Huxpro merged 1 commit into
new-lynxfrom
huxcx/m4-web-program-scope-291

Conversation

@Huxpro

@Huxpro Huxpro commented Sep 15, 2026

Copy link
Copy Markdown
Owner

Summary

  • add a fail-closed production selector that removes compiled-program thread-function support only after every paired compiler ledger proves it unused
  • split background bridge, host-prop decoding, renderer exports, and transport worklet helpers behind static replacement seams
  • retain the complete source-safe implementation for development, watch mode, general applications, missing/unpaired reports, thread functions, main-thread props, and public thread-function API or useMainThreadRef usage
  • publish the versioned selection proof in Rspeedy asset metadata

Correctness

  • the compiler feature and semantic ledgers are checked for both Lynx threads and every authored entry
  • an unavailable specialized API fails with production diagnostic OL513 instead of silently changing behavior
  • ordinary worklet-bearing builds keep the complete implementation; source graph and diagnostic ownership remain guarded
  • the regression test was verified red with the selector disabled, then restored green

Verification

  • @octanejs/lynx: 78 test files, 1,180 passed
  • @octanejs/rspeedy-plugin: 12 test files, 122 passed
  • changed-file typecheck: passed
  • pnpm sync: passed
  • formatting and diff checks: passed
  • real production automatic-core rows-0 bundle: Web 266,678 -> 247,805 bytes (-7.08%); Native 282,766 -> 246,980 bytes (-12.66%)

Performance scope

Two 7-repetition Web startup AB/BA pilot sessions remained slower than ReactLynx at FCP (36.05 vs 34.27 ms, then 35.7 vs 31.0 ms). This PR claims compiler-proved bundle/parse surface reduction only, not a #291 startup win. The formal acceptance campaign remains open.

Refs #291.

@Huxpro
Huxpro merged commit eef0b65 into new-lynx Sep 15, 2026
51 of 54 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant