Repository navigation
Conversation
10 tasks done
Owner
Author
|
Conclusion: close as superseded. Upstream PRs 693 and 700 own the materialization architecture; the only remaining independently testable teardown idea is issue 43. |
This was referenced Aug 30, 2026
Open
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
Why
P6 still spends most create@10k BTS work materializing a component owner for every keyed row, generating per-host commands that the Lynx plan wire immediately folds back into one instantiate command, and reconstructing those commands again for acknowledgement handle publication. The compiler already knows when a keyed list item is exactly one component, and the Lynx transport already knows whether its plan is announced and wire-safe. This layer carries that proof through the runtime so the intermediate representation is never built.
This is the independently mergeable P7 replacement for the product behavior in #31 and the concise heap/teardown/storm evidence from #32/#33. Those source PRs were refetched immediately before publication at frozen heads
f501941d22b6f550cf8709b8235f72339b860db4,ae7e5d72e0765fc12613f235d36ebab96ddec929, ande9d0fab6d0dde33a70c77be05f4d2e5372431fbf. Their historical bodies and state remain untouched.Changes
compiler-component-itemsrenderer capability and opt only the Lynx background/main compiler configurations into it; other universal renderers keep their existing component-owner shape.Stack
68b2b0546b28d54b7cd8d44665f95d36b58e48b3)ff7d2c71c2296b7936f17c809e46637a18963338)The fork review stack is GitHub Stack octanejs#36 and is managed with the official
gh stackextension. Upstream delivery remains bottom-to-top.Simplification
ids/eventsarrays. A diagnostic run proved P6/P7 had identical clone graph counts, while frozen array element kinds raised dispatch from about 23 to 29 ms; leaving the transaction-owned readonly arrays packed restores final dispatch to 23.3 ms without weakening the outer frozen batch/command boundary.Performance audit
Exact comparison:
68b2b0546b28d54b7cd8d44665f95d36b58e48b3ff7d2c71c2296b7936f17c809e46637a189633381a7e231e…77b842, P799b7877f…bd771; profile P653bfa7ca…c9cd, P7f68fbd8c…2d0fbenchmarks/lynx-table/attribution/results/p7-{control,profile}-final-sha.json,p7-{summary,report}-final-sha.{json,md}; startup files/tmp/p7-p6-stages-{10k,30k}.{json,md}and/tmp/p7-v2-p7-stages-{10k,30k}.{json,md}; decoded bundles/tmp/p7-v2-{p6,p7}-{control,profile}-bundle.jsonCommands:
Create@10k CPU and wall clock
The P7 acceptance gates are met: profiled BTS is below 500 ms and more than 1.5× faster; observer-free end-to-end create improves more than 10%; MTS is flat. The named analyzer covers 78.3% of P6 BTS but only 65.2% of P7, below its 80% diagnostic gate. The unassigned remainder is dominated by GC,
postMessage, and minified runtime frames after the named owners shrink; direct allocation counters and the observer-free control reproduce the owner movement, so no 80% coverage claim is made.Owner and protocol signal
Final profile wire work is invariant: one paced commit, 10,000 instantiate commands, two main-to-background responses, and 156 response bytes. Commit bytes move
3,297,894 → 3,294,798(-0.1%); dispatch is23.2 → 23.3ms (+0.4%); main prepare is474.4 → 459.6ms and apply is1,393.6 → 1,394.5ms. The optimization neither hides commands nor shifts a material cost into structured clone/main apply.Retained heap and teardown
Clear residual also falls at every scale (
4.32 → 2.65MiB at 1k,38.90 → 22.68MiB at 10k,113.74 → 64.97MiB at 30k). Every sample passes the semantic oracle and releases its background worker after page close; no super-linear candidate slope is present.Cold paths and deterministic storms
Update storm is
143.4 (141.9–159.1) → 129.2 (126.9–137.0) ms(-9.9%) with exactly 5 presentation commits / 500 changed rows / 5 wire commits / 500 commands in every sample. Select storm is46.0 (40.6–47.8) → 39.0 (34.2–39.9) ms(-15.2%) with exactly 2 / 3 / 2 / 3. The deterministic non-browser run independently passes all 25 ratio guards at 1k and 10k.Startup and bundle budget
Startup uses separate reportable AB/BA n=5 windows per exact source tree. The final test-only amend rebuilds both profile/control artifacts to the same SHA-256 as the measured product tree.
@lynx-js/[email protected]decodedmain.lynx.bundle; gzip uses Node zlib over the exact decoded main/background bytes and whole artifacts.main.web.bundleis a Web wrapper rather than a tasm input, so it is measured directly.main.lynx.bundlemain.web.bundleThe profile build has the same conclusion: decoded main +0.31% gzip, background +4.34%, whole Lynx +2.08%, and Web +2.75%. Every bundle gzip cell remains below the 5% P7 budget; the background increase is the explicit cost of the new generic compiler/runtime path and tests do not ship in these bundles.
Validation
pnpm format:files:checkpnpm sync;git diff --check; final worktree cleanpnpm typecheck:fileswas also attempted with the changed Octane test files. It reaches pre-existing test-project declaration failures for@tsrx/coreand.tsrxfixtures plus existing implicit-any sites inuniversal-renderer.test.ts; product-source scoped typecheck passes, and the full 6,436-test Octane project validates those test files through the repository's intended transform.Risk / follow-ups
Provenance
agent-authored)f501941d22b6f550cf8709b8235f72339b860db4ae7e5d72e0765fc12613f235d36ebab96ddec929, perf(lynx): lock teardown and storm constants #33 @e9d0fab6d0dde33a70c77be05f4d2e5372431fbf