-
Notifications
You must be signed in to change notification settings - Fork 0
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
Investigate app memory usage #4055
Comments
There was one instance around Feb 3rd 2020 where low_memory warnings were correlated with the app crashing. See https://hippware.slack.com/archives/C2V6L53TQ/p1580781852115000?thread_ts=1580745379.101800&cid=C2V6L53TQ We should investigate memory usage and/or try to improve it (if not too much work). For example:
|
App uses about 220Mb. But... Occasionally found memory leak today, by pressing menu button, so now it uses 254 after many many menu button taps. I will investigate more |
FYI, when I (very briefly) looked at this last year, I looked for a component which could retrieve the amount of memory being used by the app and found react-native-vitals. https://github.com/robinpowered/react-native-vitals YMMV. |
Very useful article: https://blog.swmansion.com/hunting-js-memory-leaks-in-react-native-apps-bd73807d0fde |
I did many measurements of app memory usage, but they are very very unstable and not reproducible. Sometimes the difference is bigger, sometimes - smaller, it probably depends from garbage collector. However I found some evidence where most leaks are placed - from difference snapshot I see many objects are from React Navigation. I was not able to find own app memory leaks - after I reduced code I still saw memory leaks... Similar issue: react-navigation/react-navigation#7078 Even if I don't use react navigation, just tap to see fullscreen map and then tap again to return to previous state I see very small but memory leaks: I see similar issue here: Measurement results:
|
Some bugsnags with memory stats have been posted (after 4891 was merged). It's reporting memory usages of 126MB, 89MB, 35MB, 41MB when the low memory warning was triggered. These numbers seem ... okay? https://app.bugsnag.com/hippware/tinyrobot-1/errors/5e6be5dcb90f3d00176c4caf |
There was one instance around Feb 3rd 2020 where low_memory warnings were correlated with the app crashing. See https://hippware.slack.com/archives/C2V6L53TQ/p1580781852115000?thread_ts=1580745379.101800&cid=C2V6L53TQ
We should investigate memory usage and/or try to improve it (if not too much work). For example:
(Original Post)
Bit worried about the app being killed by the OS if it uses too much memory.
This has been mentioned (by me) as a possible cause of #4037.
The text was updated successfully, but these errors were encountered: