Repository navigation
Fix Animated re-pushing event-driven props every frame while an animation changes nothing (#59835) - #59835
Open
dalves wants to merge 1 commit into
Open
Fix Animated re-pushing event-driven props every frame while an animation changes nothing (#59835)#59835dalves wants to merge 1 commit into
dalves wants to merge 1 commit into
Conversation
|
@dalves has exported this pull request. If you are a Meta employee, you can view the originating Diff in D129435409. |
dalves
force-pushed
the
export-D129435409
branch
from
November 17, 2026 05:56
a94e8a3 to
ec4e173
Compare
…tion changes nothing (react#59835) Summary: When an animation tick changes no view, `NativeAnimatedNodesManager::pullAnimationMutations` (shared animation backend) and the legacy `onRender` assume an event-driven animation has just finished. They re-run every `Animated.event`-driven value and push all of its props again with `forceFabricCommit`. That condition holds on every frame while any native animation is active but drives no view, so each frame re-applies all event-driven props, posts an empty Fabric commit to the JS thread, and mounts another `UPDATE_PROPS` batch even though nothing is redrawn. This diff runs that re-sync only when an event-driven animation was actually in progress (`isEventAnimationInProgress_`), so it happens once after the last event, as intended. Changelog: [General][Fixed] - Avoid redundant native Animated prop updates while an animation changes no view. Reviewed By: zeyap Differential Revision: D129435409
dalves
force-pushed
the
export-D129435409
branch
from
November 20, 2026 18:49
ec4e173 to
77c4300
Compare
This branch has not been deployed
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.



Summary:
When an animation tick changes no view,
NativeAnimatedNodesManager::pullAnimationMutations(shared animation backend) and the legacyonRenderassume an event-driven animation has just finished. They re-run everyAnimated.event-driven value and push all of its props again withforceFabricCommit. That condition holds on every frame while any native animation is active but drives no view, so each frame re-applies all event-driven props, posts an empty Fabric commit to the JS thread, and mounts anotherUPDATE_PROPSbatch even though nothing is redrawn.This diff runs that re-sync only when an event-driven animation was actually in progress (
isEventAnimationInProgress_), so it happens once after the last event, as intended.Changelog:
[General][Fixed] - Avoid redundant native Animated prop updates while an animation changes no view.
Reviewed By: zeyap
Differential Revision: D129435409