Skip to content
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

Performance Issues with useNativeDriver in React Native 0.74.1 of New Arch: Comparing Animation Smoothness and FlatList Scrolling #44514

Open
Hao-yiwen opened this issue May 10, 2024 · 2 comments
Labels
Component: FlatList Needs: Triage 🔍 Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules)

Comments

@Hao-yiwen
Copy link

Description

In my React Native 0.74.1 app using the new architecture, when there are complex animations on a page, the animations display smoothly and the FlatList scrolls fluidly if I set useNativeDriver=false. However, when I set useNativeDriver=true, both the page animations and FlatList scrolling become choppy.

Steps to reproduce

  1. yarn
  2. npm run android

React Native Version

0.74.1

Affected Platforms

Runtime - Android, Runtime - iOS

Areas

Fabric - The New Renderer

Output of npx react-native info

System:
  OS: macOS 14.2.1
  CPU: (8) arm64 Apple M2
  Memory: 125.22 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.12.1
    path: ~/.nvm/versions/node/v18.12.1/bin/node
  Yarn:
    version: 1.22.22
    path: ~/.nvm/versions/node/v18.12.1/bin/yarn
  npm:
    version: 8.19.2
    path: ~/.nvm/versions/node/v18.12.1/bin/npm
  Watchman:
    version: 2023.12.04.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods: Not Found
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.0
      - iOS 17.0
      - macOS 14.0
      - tvOS 17.0
      - watchOS 10.0
  Android SDK: Not Found
IDEs:
  Android Studio: 2023.2 AI-232.10300.40.2321.11567975
  Xcode:
    version: 15.0.1/15A507
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.9
    path: /usr/bin/javac
  Ruby:
    version: 3.2.0
    path: /Users/yw.hao/.rvm/rubies/ruby-3.2.0/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.74.1
    wanted: 0.74.1
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: Not found
  newArchEnabled: false

Stacktrace or Logs

Shown in the following video.

Reproducer

https://github.com/Hao-yiwen/rn_0741

Screenshots and Videos

old Arch:
https://github.com/facebook/react-native/assets/42827938/ae9ba77c-71b9-4901-bd2b-0c735658573f

new Arch:
https://github.com/facebook/react-native/assets/42827938/d29cec27-672c-4e72-bf1b-d51ce57c5d92

@Hao-yiwen Hao-yiwen added Needs: Triage 🔍 Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules) labels May 10, 2024
@Hao-yiwen
Copy link
Author

Why use useNativeDriver:false will make animated greatly,and useNativeDriver:true lead to animations and FlatList scrolling become choppy.This is really a strange thing.

@Hao-yiwen Hao-yiwen changed the title Performance Issues with useNativeDriver in React Native 0.74.1: Comparing Animation Smoothness and FlatList Scrolling Performance Issues with useNativeDriver in React Native 0.74.1 of New Arch: Comparing Animation Smoothness and FlatList Scrolling May 10, 2024
@Hao-yiwen
Copy link
Author

This question make animation Stuck and stopped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: FlatList Needs: Triage 🔍 Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules)
Projects
None yet
Development

No branches or pull requests

1 participant