Skip to content

fix: less often remount on scrollview#1

Merged
WoLewicki merged 1 commit into
0.81.4-discordfrom
wolewicki/scrollview-mount-performance
Jun 18, 2026
Merged

fix: less often remount on scrollview#1
WoLewicki merged 1 commit into
0.81.4-discordfrom
wolewicki/scrollview-mount-performance

Conversation

@WoLewicki

@WoLewicki WoLewicki commented Jun 17, 2026

Copy link
Copy Markdown

On the New Architecture (Fabric), Reanimated commits the shadow tree ~once per animation frame, and each mount transaction unconditionally called _remountChildren, re-clipping the entire descendant subtree even when nothing scrolled or changed layout.

Guard _remountChildren with RCTMountingTransactionAffectsClipping, which returns YES only when the transaction can change clipping: an Insert/Remove mutation, an Update with changed layoutMetrics, or an Update toggling removeClippedSubviews. maintainVisibleContentPosition is unaffected since _adjustForMaintainVisibleContentPosition still runs on every mount.

Moves the change from the React-RCTFabric local pod patch (discord/discord#292855) directly into the RN fork.

On the New Architecture (Fabric), Reanimated commits the shadow tree
~once per animation frame, and each mount transaction unconditionally
called _remountChildren, re-clipping the entire descendant subtree even
when nothing scrolled or changed layout.

Guard _remountChildren with RCTMountingTransactionAffectsClipping, which
returns YES only when the transaction can change clipping: an
Insert/Remove mutation, an Update with changed layoutMetrics, or an
Update toggling removeClippedSubviews. maintainVisibleContentPosition is
unaffected since _adjustForMaintainVisibleContentPosition still runs on
every mount.

Moves the change from the React-RCTFabric local pod patch
(discord/discord#292855) directly into the RN fork.
@WoLewicki WoLewicki merged commit 2f35e80 into 0.81.4-discord Jun 18, 2026
61 of 75 checks passed
@WoLewicki WoLewicki deleted the wolewicki/scrollview-mount-performance branch June 18, 2026 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant