react-native: app is very slow in android Samsung 23 ultra
Description
App is very slow in Samsung devices especially in the android version 13 and also in the android logcat I get error
2023-08-28 17:37:37.826 1288-1288 LayerHistory | surfaceflinger | MainActivity$_27693#87452 Max (can't resolve refresh rate)
React Native Version
0.72.4
Output of npx react-native info
System: OS: macOS 13.5.1 CPU: (10) arm64 Apple M1 Pro Memory: 152.75 MB / 16.00 GB Shell: version: “5.9” path: /bin/zsh Binaries: Node: version: 20.5.1 path: /opt/homebrew/bin/node Yarn: version: 1.22.19 path: /usr/local/bin/yarn npm: version: 9.8.1 path: /opt/homebrew/bin/npm Watchman: version: 2023.08.14.00 path: /opt/homebrew/bin/watchman Managers: CocoaPods: version: 1.12.1 path: /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: - DriverKit 22.4 - iOS 16.4 - macOS 13.3 - tvOS 16.4 - watchOS 9.4 Android SDK: Not Found IDEs: Android Studio: 2022.3 AI-223.8836.35.2231.10671973 Xcode: version: 14.3.1/14E300c path: /usr/bin/xcodebuild Languages: Java: version: 11.0.20 path: /usr/bin/javac Ruby: version: 2.6.10 path: /usr/bin/ruby npmPackages: “@react-native-community/cli”: Not Found react: installed: 18.2.0 wanted: 18.2.0 react-native: installed: 0.72.4 wanted: 0.72.4 react-native-macos: Not Found npmGlobalPackages: “react-native”: Not Found Android: hermesEnabled: true newArchEnabled: false iOS: hermesEnabled: true newArchEnabled: false
Steps to reproduce
I just installed my app and run on the Samsung s23 ultra it was running fine but very slow and very bad response when I navigate. It takes around 10 seconds just to navigate, this issue occurs only in Samsung android devices. Is there any fix to it.
Snack, screenshot, or link to a repository
About this issue
- Original URL
- State: closed
- Created 10 months ago
- Comments: 48 (9 by maintainers)
This issue is waiting for author’s feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days.
This issue is waiting for author’s feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days.
I’m facing the same issue on Android using Exynos CPU. It’s working very well on an Snapdragon one. The network call is very slow : 5s vs 100ms on iPhone but I think the source of problem is the rendering which blocks the JS thread. Do we have any news on this thread ?
We are having the same issue. Most of the samsung device are lagging with 2 of our react-native apps. I’ve sensed the lag in from a normal device to high end devices Samsung 22 ultra. Lag is there in tabs as well. But same things are working smooth in other Brands devices from 4 years ago.
If anyone knows any workarounds or patches, I’d really appreciate. Thanks!
@rubbishCoder we also have a huge increase of SIGABRT/ANR from hundreds of Samsung users, we have also reach to a point where we believe its related to August updates, just bought a new device to test. Our app crashes at random points in time, no memory leaks. The issue is applying retroactively across all our app versions.
will try to create a reproducer @cortinico
@rubbishCoder I think this is a problem on the engine side and RN Core. Redux is only on the js side so it doesn’t affect that much, but if you have a large store and heavy functions then yes Redux can affect. You can debug components where used redux and see if it affects
@devoren okay I will downgrade and check it
This seems unrelated to React Native core per say. What’s likely impacting your navigation could be: the navigation library; a different JavaScript engine; animations; etc.,.
Can you add more information:
And if this is a problem with core React Native a reproducible repo would help initialize an investigation. If this is core problem you should be able to create a reproduction with just a bare app and no external libraries.