Repository navigation
perf(octane): clear inert keyed rows at root commit - #976
Merged
domgan-oai merged 1 commit intoSep 6, 2026
Merged
Conversation
domgan-oai
marked this pull request as ready for review
September 6, 2026 22:59
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
Why
krausest/js-framework-benchmark#2093 reports a 28.8% clear regression while upgrading Octane. The earlier release could clear an owned table body in one DOM operation; root render transactions subsequently made the ordinary clear retain and remove each row individually. The new path preserves rollback while restoring bulk removal for safe host-only lists.
Validation
pnpm --config.verify-deps-before-run=warn sync(no generated tracked changes).pnpm --config.verify-deps-before-run=warn format:files:check,git diff --check, andtsrx-tsc --noEmit -p packages/octane/tsconfig.json.[email protected]source 10.8 / 10.3 ms, current unmodified source 12.6 / 12.3 ms, candidate 10.9 / 10.7 ms (medians). Strong mode produced byte-identical bundles for this fixture. This local click timer excludes paint and is not the upstream Chrome timeline.pnpm format:check,pnpm typecheck, four shardedpnpm testlanes, website, browser, React parity, package validation, and example checks.Risk / follow-ups
@tsrx/[email protected]and@tsrx/[email protected]. Source tests and browser builds used cached older TSRX tooling, so CI must validate the locked versions.Provenance
agent-authored)Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Note
High Risk
Touches core keyed-list reconciliation, root transaction journaling, and suspension rollback—incorrect deferral could leak DOM, skip cleanups, or break undo on failed renders.
Overview
Restores fast bulk clearing for owned keyed lists (≥16 inert, single-host rows with no effects, refs, or nested scopes) by deferring DOM removal until the root render commits, using one
textContent = ''wipe when the parent is still wholly owned. Suspended renders keep rows connected and swap the key map viajournalForOwnedListClearso rollback can restore the prior list; lists that need lifecycle teardown still use per-row parking and the existingbatchClearItemspaths.The js-framework benchmark harness now calls Octane’s
flushSyncthroughwindow.__benchFlush, checks that each op’s DOM is committed inside the timed click, and adds an opt-inCLEAR_1K/CPU_THROTTLEdiagnostic suite without changing the canonical 10kclearop.Tests cover owned-parent clear with
@empty, suspension rollback, refills, foreign DOM, large ref cleanups, and hydration clear/refill on adopted lists.Reviewed by Cursor Bugbot for commit 457ed79. Bugbot is set up for automated code reviews on this repo. Configure here.