-
Notifications
You must be signed in to change notification settings - Fork 24k
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
app is very slow in android Samsung 23 ultra #39183
Comments
|
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. |
@AndreiCalazans animations or the navigation is not a problem, I thing the axis call is the one that cause the lag. I tried to stop all the api calls and navigated between pages it was fine and rendering fast but when I do async or synchronous api calls the app is slow. Using Using below packages for navigation.
Using Hermes js engine. Lottie animation json is used to render animations Will create a repo with reproducible issue and update it. |
May be related to #36296 |
Possibly relate dto #36296, @rubbishCoder did you experience this slow down after upgrading? And yea, a reproduction sample can help us profile and see what's going on. |
@AndreiCalazans @devoren even after updating to latest version I'm facing this issue. And I'm not able to recreate this in a different project |
@rubbishCoder Can you downgrade to version 0.71.8 and see if there is a performance improvement? |
@devoren okay I will downgrade and check it |
@devoren no effect after downgrading to 0.71.8 |
@rubbishCoder oh, this is bad, then we just have to wait for a patch or release from the RN developers :(, in my case 0.71.8 is much better than 0.72 |
@devoren does redux have anything to do with it? |
@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 or @AndreiCalazans if I access redux state to set the stacks and also few data to be shown in bottom tab navigator, will it affect the navigation. |
@rubbishCoder hard to say simply from your comment, your app is total black box to us, there could be many factors at play. What's not clear to me in your issue is if this was a regression that occurred after you upgraded your React Native version or if this was something you just found out that is impacting users on Samsung 23 ultra devices? I ask the above because there is an ongoing issue with people experience app wide performance degradation on versions 0.70.x + #36296 |
@AndreiCalazans initially I found this issue on react-native 0.71.6. so later I upgraded it to 0.72.4 it was slightly better but still bad performance. It's not only occuring in s23 ultra, it's on Samsung devices with Android version 13. |
@AndreiCalazans @devoren when I do asynchronous api calls the response takes more time in android version 13. For example in IOS it took 1 second same call in android takes 15 secs. Any idea what will cause this. |
@rubbishCoder can you try profiling it and comparing the iOS profilings with the Android? That's odd if the actual network request latency is the same. The difference could be the parsing of the request response so a profiling could help indicate where the time was spent. Save the CPU profilings and share it here for us to take a look. See this for how to use chrome://inspect to profile performance. |
Can we have a reproducer and a video to understand "how bad" is the regression? |
@cortinico |
@rubbishCoder Have you debugged your API request? At what part does the query become slow? |
I make axios call and it take 10 seconds to return a response |
We can't provide any support without a reproducer (when I say reproducer I don't mean your project but another project that behaves similarly) |
Did you check the time from the server when calling the request? Is the request on the server delayed by 10 seconds or does the response arrive with a delay of 10 seconds? |
@cortinico I tried removing persist and test in Samsung S23 its still the same behaviour no difference. Ram usage drastically got reduced but still the performance was bad in s23. So not sure which is causing the issue. |
Again, without a reproducer we can't help in any form |
|
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! |
@cortinico @AndreiCalazans We had done the profiling and captured the trace from Samsung S23 Ultra and Oneplus 9pro. Sharing the trace for reference. Oneplus is working fine without any lag in network or in rendering but Samsung there is lag in both network and rendering. Trace: https://drive.google.com/drive/folders/1f441btiLRdcpAwtktWhBrd8QHQN2yvL9?usp=sharing |
@PradeepKK13 this is helpful. One thing that stood out while comparing those two traces is native module traces of This seems to be due to binder transactions taking much longer. Evidence: Traces to Note calls are at 36ms Querying for max and averages Max at 113ms while average is 0.8ms On S23 Ultra We see multiple Max at 300ms while average is 2.91ms Looking at the binder transactions we confirm slower binder transactions: Summary:
@PradeepKK13 it's not obvious if this is the reason for a slower rendering and networking but it could be. Can you do the same trace on this same Samsung S23 Ultra device using the previous React Native version that had no lag? This could help us compare the two traces and validate if the binder transactions got slower or were the same. |
@AndreiCalazans Thanks for your insights. Unfortunately we don't have a React Native version in which there was no lag. Initial project was in 0.71.6 version which had the same lag and then we upgraded to 0.72.4 version which made no difference. |
@PradeepKK13 can you try downgrading to 0.68? |
We are using 0.64.4 and we are also experiencing a really slow performance on Samsung s23. |
Also having issues running my React Native app on a OnePlus with OxygenOS (based on Android 13.x), very laggy |
hello, same issue for me, on an application that has been running without problem for 2 years, Issues on galaxy s23, has anyone been able to solve it? |
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. |
This issue is waiting for author's feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days. |
Can the stalebot be disabled on this one? This seems related to #36296 so i believe that is pertinent to keep it open. |
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 was closed because the author hasn't provided the requested feedback after 7 days. |
1 similar comment
This issue was closed because the author hasn't provided the requested feedback after 7 days. |
We are also facing that issue, any idea on whats next? |
bump |
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
https://snack.expo.dev/qb7Cur_lU
The text was updated successfully, but these errors were encountered: