-
Notifications
You must be signed in to change notification settings - Fork 24.6k
Animation is 20x slower in New Architecture. #50716
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thank for the issue @bglgwyng. A couple of questions to understand better:
|
I tried to build the New Arch for release and it is better, but not the same.
|
The same result here. New Architecture ScreenRecording_04-15-2025.19-03-03_1.MP4Old Architecture ScreenRecording_04-15-2025.18-58-17_1.MP4Old architecture is still a bit smoother in release mode. |
@cipolleschi but old arch is till too fast in debug as compared to new arch release |
I scaffolded this repo with |
@bglgwyng yes, i mean the bare rect native app that is created with I asked around internally. The reason of the slowness is because these are all animation driven by JS instead of using the Native Driver. We want to deprecate JS driven animation in favor of native driven animation in the future, as the native driven animation are more performant. We can't do it just now because native driven animation does not support animating layout property just yet, but we are working on implementing the missing feature. |
Thanks for you reply!
Also, as |
I believe, but @sammy-SC can confirm that, that the New Architecture is slower because we have to hop through multiple layers to run the animation. In the Old Architecture, JS was talking directly with the Platform layer (iOS and Android) modifying the Platform tree of views directly: as soon as the React tree was changing, the Platform tree was updated. In the New Architecture, we have multiple trees:
With JS driven animation, we update the React tree, the React tree updates the Shadow tree in C++ and the Shadow tree communicates the changes to the Platform tree. We have an extra step and more overhead, overall. With native driver, we are skipping the update to the shadow node. This allows for faster animations, but the Shadows node and the platform tree might end up out-of-sync |
@cipolleschi I felt reanimated animations are also slower in the New Architecture, but they need to be inspected more accurately. Is your explanation also applicable to the case of reanimated? |
Description
Animation is 20x slower in New Architecture. Watch the video below.
Steps to reproduce
Run the app in both branches and compare.
https://github.com/bglgwyng/animation-performance-comparison-rn-79/tree/new-architecture
https://github.com/bglgwyng/animation-performance-comparison-rn-79/tree/old-architecture
React Native Version
0.79.0
Affected Platforms
Runtime - iOS
Output of
npx @react-native-community/cli info
Stacktrace or Logs
Reproducer
https://github.com/bglgwyng/animation-performance-comparison-rn-79
Screenshots and Videos
New Architecture
ScreenRecording_04-15-2025.11-20-58_1.MP4
Old Architecture
ScreenRecording_04-15-2025.11-18-01_1.MP4
The text was updated successfully, but these errors were encountered: