Repository navigation
perf(client): speed up keyed updates and reactive traversal - #59
Merged
Marcisbee merged 7 commits intoOct 22, 2026
Merged
Conversation
Marcisbee
marked this pull request as ready for review
October 22, 2026 10:00
Marcisbee
deleted the
kode/cSZShdLw-improve-radi-client-runtime-performance
branch
October 22, 2026 12:51
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.
Radi repeatedly searched keyed arrays, used XPath unions to discover reactive descendants, and copied live child-node collections during reconciliation. Keyed searches now use a map/set; reactive discovery uses a TreeWalker snapshot; component discovery and child snapshots walk siblings; and single reactive-text updates avoid general reconciliation collections. Both child lists are still snapshotted before reconciliation. Moved-row render callbacks, DOM identity, native events, cleanup, and the public API remain unchanged.
The table playground also uses reactive label and selection bindings inside retained keyed rows. Previously its update button changed the data without changing displayed labels. Its regression test checks every row across repeated updates, DOM identity, and selection.
The final child-snapshot optimization was compared with preceding PR revision
428595e, using the unchanged PR #57 harness (6b6956a). Each workload used 10 measured samples after 3 warmups in Chromium 156. Two baseline runs and two candidate runs produced these ranges of median commit times:Not every workload improved. Other update timings varied between runs; unmount measured slightly slower in both candidate runs, without an isolated cause. Creation remains above the original pre-PR historical result of 36.10–36.70 ms. Preact and Vue remain faster on most operations. Earlier PR changes reduced replacement and cleanup costs; the original clear median was 8.15 ms. Historical comparisons across rounds are subject to run variation.
The final snapshot change adds 16 gzip bytes (4,996 → 5,012), or 167 bytes over the original runtime. Mounted post-GC JS heap remains approximately 10.46 MiB. The final full comparison includes all five frameworks; repeats isolate Radi using identical scenarios and correctness checks. Separate reverse-order profiling measures adapter bookkeeping outside runtime work: at 1,000 rows, median batch averages changed from 0.02 ms bookkeeping / 11.12 ms runtime to 0.03 / 7.27 ms. Raw samples, source hash, environment, and methodology accompany the task.
Validation: all 315 tests pass after incorporating current master, including its resumption additions. The 61 focused construction, root reconciliation, connection/update event, traversal, keyed-list, playground, and child-prop tests pass in Chromium, Firefox, and WebKit. Ten server-runtime tests and three release-tooling tests pass. Package generation, version check, and npm pack dry run pass. The refreshed real playground serves the current bundle and passes repeated every-tenth-row updates and selection. No API, compiler, component model, or release-version change is included.