metamask-mobile
metamask-mobile copied to clipboard
Android performance improvement: replace crypto libraries
One of the points of slow down on android - when starting the app, creating a new wallet, and logging in - are the cryptographic functions associated with the Keyring controller and Encrypt.js. These are all imported from third parties.
We can attempt to solve these performance issues by replacing the libraries. In particular, metamask-mobile/app/core/Encryptor.js could use https://github.com/ricmoo/aes-js for aes methods, and then access the pbkdf2 module from https://github.com/tradle/react-native-crypto
This will allow us to run more code in pure javascript, which will be easier to maintain and in this case may yield performance benefits.