-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
[Android] Very high memory usage. App becomes very laggy! #16590
Comments
I even see growing memory in sample app #16600 |
Maybe related #16732 |
Resolved? How? @kesha-antonov |
Unfortunately now. Still very high memory usage @lhfiii |
@kesha-antonov It may be related with memory leak. Try to display a number of image with FlatList. Even close the activity does not help. Especially on android 4 |
I have replace fresco with glide and the leak still exists. It seems that the leak comes from other native module. I have found a lot of YogaNode in the FinalizeReference chain. |
YogaNodePool.get().clear(); release reference. |
Hello @droidwolf ! |
activity onDestory |
Could you guide where to put it? and where's Activity onDestory()? |
still unsolved? my RN 0.52 app also take huge chunk memory and then crash. base on a screenshot user provide to me, it's this phone: my app use I am still researching how to debug high memory usage problem. |
@kesha-antonov @droidwolf @1c7 @pavanmehta91 |
@tehong I open an issue about this: #17801 I am not an RN expert/mobile dev expert, so I can't solve this myself. |
Same as @1c7 |
Hi folks, going to close this in favour of #13413, so that we avoid redundancy - the core team is aware of this Android+Flat/SectionList+Images issue (going to write a follow up there). |
@kesha-antonov which profiling tool is it. Looks really cool. Sorry new to react native. |
@rahulnpadalkar It's Android Studio |
Hello! I have an app with not very complex UI. But with lots of code. And it takes a lot of memory in android. And becomes very laggy after few screens loaded. In iOS code works without any lag in dev/prod modes.
Is this a bug report?
Yes. In iOS same code works great whether is in dev mode or production mode.
Here's memory usage without remote debugger turned on:
Here's memory usage with remote debugger turned on (see memory usage reduced):
Even if I reduce views - memory usage is still high:
Have you read the Contributing Guidelines?
Yes.
Environment
Environment:
OS: macOS High Sierra 10.13
Node: 6.11.3
Yarn: Not Found
npm: 5.4.2
Watchman: 4.9.0
Xcode: Xcode 9.0 Build version 9A235
Android Studio: 2.3 AI-162.3871768
Packages: (wanted => installed)
react: ^16.0.0 => 16.0.0
react-native: github:facebook/react-native#60c898d8643daf80ef8175af7dc8411709eff379 => 1000.0.0
RN - 0.50-rc
Steps to Reproduce
git clone https://github.com/kesha-antonov/rn_memory_usage_test_high_usage
cd rn_memory_usage_test_high_usage
npm i
nano node_modules/react-native-sentry/android/build.gradle
androids/local.properties
react-native run-android
adb shell dumpsys meminfo com.rn_memory_usage_test_high_usage
Expected Behavior
25-75 MB of memory usage will be fine I guess.
With no lags, no frame drops
Actual Behavior
A lot of memory used: 165-261 MB
Users experience good look of first screen and when they go through the app it becomes laggy
Reproducible Demo
https://github.com/kesha-antonov/rn_memory_usage_test_high_usage
The text was updated successfully, but these errors were encountered: