Skip to content

Commit 0747590

Browse files
shubh73claudeintergalacticspacehighway
authored
Don't clone zeroed out display: none subtrees on every layout pass (#2055)
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]>
1 parent 4d4399f commit 0747590

2 files changed

Lines changed: 438 additions & 3 deletions

File tree

0 commit comments

Comments
 (0)