metamask-mobile icon indicating copy to clipboard operation
metamask-mobile copied to clipboard

Android performance issues

Open danjm opened this issue 5 years ago • 2 comments

This is an issue to track places where we have noticed performance issues on android.

Describe where in the app you saw something taking longer than it should have, or the user not getting any feedback for too long a time.

danjm avatar Apr 28 '20 15:04 danjm

"bouncing" loading indicator on first opening the app (or reloading the app), can take way too long

Here is a good screen capture https://recordit.co/qUninW7pk2

I actually saw this taking way long than in the screen capture, like 60+ seconds, earlier. This was on an emulator. But that went away after restart of my local system.

When I tracked this down, what I found was that the callback to the setTimeout in componentDidMount of Views/Entry/index.js was not called when expected (i.e. after the 100 millisecond delay). Tracking that down further show that the callTimers in the core native library file metamask-mobile/node_modules/react-native/Libraries/Core/Timers/JSTimers.js was not called when expected. The comment there said it should be called from the native side. I have not debugged the native side yet. I also have not confirmed whether the smaller delay shown in the screen capture above has the same cause.

danjm avatar Apr 28 '20 16:04 danjm

Screenshot from 2020-04-28 13-38-55

Short details, I traced this to metamask-mobile/node_modules/react-native-aes-crypto/android/src/main/java/com/tectiv3/aes/RCTAes.java. In particular the pbkdf2 method and encryptDecrypt of metamask-mobile/node_modules/react-native-aes-crypto/android/src/main/java/com/tectiv3/aes/CryptLib.java

danjm avatar Apr 28 '20 16:04 danjm

Addressed by other performance work.

sethkfman avatar Jul 30 '25 19:07 sethkfman