Repository navigation
perf: inline fixed-arity event bundle arguments - #995
Merged
domgan-oai merged 1 commit intoSep 8, 2026
Merged
domgan-oai merged 1 commit into
domgan-oai merged 1 commit into
Conversation
domgan-oai
marked this pull request as ready for review
September 8, 2026 14:07
Closed
68 of 84 tasks
14 of 21 tasks
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
argsslot as a numeric arity tag on these two shapes so the shared dispatch read stays in its existing offset. Arity zero retains its shared empty array; the variadic path retains an array.Why
The runtime currently retains one additional array per
evt1/evt2handler, including two such handlers on each keyed js-framework row. Updates also journal the bundle and its mutable argument array separately. This specializes only the fixed arities and leaves the compiler call ABI unchanged.Changes
a0/a1fields inevt1/evt2, update them in place, and journal only the bundle for rollback.octanepatch changeset.Validation
evt1112.13 → 64.11 bytes andevt2120.10 → 72.06–72.10 bytes per bundle, including the retained reference slot.evt0andevtNare unchanged. All candidate maps remain fast; the one shared baseline bundle map becomes three maps.preserveDispatchedBundleorjournalObjectOncefrom the scalar update paths turned the corresponding scenario red. Pinned current-head CI passed all 26 jobs at19c829d16831a1e3d59a862838f380dddffccb94;audit-events-portals.test.tspassed 20/20 tests in bothoctaneandoctane-prod. Typecheck, Chromium, and parity passed. The initial parity run had an asynchronous upstream Dialogact(...)warning that did not recur on the identical-head retry.git diff --check, standalone version generator, and package inventory check (122 publishable packages).event-delegationcorrectness/work gates and builtbundle-size, but both jobs failed the exact same 55 pre-existing bundle-size ratio guards, with no new guard breach. On the pinned toolchain the Octane TSRX framework bundle is +171 raw / +65 gzip / +48 Brotli bytes (84,668/28,323/25,278 → 84,839/28,388/25,326). Two-sample event timings across separate hosted VMs moved for every framework and cannot isolate this PR. Only the fork-only workflow differs from PR/main source; package source, benchmarks, and lockfile were pinned to their respective commits.pnpm synccould not reach the generators locally: the configured registry returned 403 for pinned@tsrx/[email protected]after lockfile policy checks. Prior automatic approval review rejected fetching this package directly from the public registry as a bypass. Current-head CI validated generated files and the pinned test suite.Risk / follow-ups
The extra arity distinction adds two bundle maps and a dispatch type branch; same-machine mixed-dispatch measurements were neutral, while real keyed DOM mount timings overlapped noise. The source-only browser harness does not establish a whole-app speedup. The two public tests cover the otherwise subtle reentrant and rollback semantics. This follows merged #991 and #992 and addresses the fixed-arity argument-storage suggestion in #981.
Refs #981.
Provenance
agent-authored)Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.