Repository navigation
Commit 0747590
Don't clone zeroed out
zeroOutLayoutRecursively runs for every display: none child on every
layout pass of its parent, and called cloneChildrenIfNeeded() at every
level of the hidden subtree. When the subtree is shared with an earlier
tree, the clone callback fired for every hidden node on every pass, even
though zeroing it out again changed nothing. In React Native each of
those callbacks is a ShadowNode clone.
Skip cloning and recursing into children whose subtree is already zeroed
out. configVersion is ignored in that check: it only validates the
layout cache, which is empty after zeroing out, and embedders such as
React Native set it again when they give a cloned node its config.
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: nishan (o^▽^o) <[email protected]>display: none subtrees on every layout pass (#2055)1 parent 4d4399f commit 0747590
2 files changed
Lines changed: 438 additions & 3 deletions
0 commit comments