perf: move cold hydration scans and LIS marking out of the hot diff functions - #5229
Closed
JoviDeCroock wants to merge 3 commits into
Closed
perf: move cold hydration scans and LIS marking out of the hot diff functions#5229JoviDeCroock wants to merge 3 commits into
JoviDeCroock wants to merge 3 commits into
Conversation
📊 Tachometer Benchmark ResultsSummaryduration
usedJSHeapSize
Resultscreate10kduration
usedJSHeapSize
filter-listduration
usedJSHeapSize
hydrate1kduration
usedJSHeapSize
many-updatesduration
usedJSHeapSize
replace1kduration
usedJSHeapSize
run-warmup-0
run-warmup-1
run-warmup-2
run-warmup-3
run-warmup-4
run-final
text-updateduration
usedJSHeapSize
tododuration
usedJSHeapSize
update10th1kduration
usedJSHeapSize
|
|
Size Change: +7 B (+0.04%) Total Size: 15.9 kB 📦 View Changed
ℹ️ View Unchanged
|
marvinhagemeister
approved these changes
Sep 2, 2026
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.
Note
This PR was authored by an LLM (Claude Fable 5.1) during the v11 release-readiness audit; Jovi reviewed the change and the tests.
Summary
Pure refactor, no behaviour change. Three cold code paths that only run on suspended or streamed hydration and on genuine reorders lived inline in the hottest functions:
diff()→collectExcess()diff()'s catch block →suspendVNode()constructNewChildrenArray()→markMoves()Why
While profiling the rc.1 vs 10.29.8 gap on the
text-updateandreplace1kbenches, both turned out to be warm-up effects: warmed up, v11 is faster than v10, but the benches measure the first 100 renders / the 6th run, where the interpreter and baseline tiers dominate and tier-up timing matters. V8 bytecode fordiff()had grown from 2502 to 2923 bytes andconstructNewChildrenArray()from 657 to 751, which delays optimisation of both. After extraction they are 2197 and 554 bytes, below their v10 sizes.Cold, interleaved medians over 60 fresh pages (CDP harness, minified bundles):
replace1kis unchanged by this (its residual is diffuse tier-up timing). Core brotli: 4428 → 4430 B.