Reputation: 10732
I have heard that React Native's JavaScriptCore VM on Android does not allocate memory in the Java heap but rather somewhere else (native heap?), so it won't appear in tools like the Android Memory Monitor.
Is this true, and if so, how can I measure actual memory usage of an Android app that uses React Native?
Is the memory usage accurate if I use the Android Device Monitor per this post?
Upvotes: 4
Views: 3810
Reputation: 1008
In Android Studio you can run the app in debug mode and turn on the Android Profiler to get a look at CPU, Memory and Networking stats.
Upvotes: 1
Reputation: 83
In android device monitor if you go to preferences -> DDMS tab and then check 'Thread updates enabled by default' and check 'Heap updates enabled by default'. Then via the System information tab in ADM you should be able to access 'Memory usage' via the drop down.
Alternatively if you inspect js remotely via chrome there is also a memory tab that could be useful to you.
Upvotes: 2