Search code examples
react-nativeexporsajsencryptnode-forge

Expo: RSA decrypt huge performance drop after updating from SDK 47 to 50


I was developing a mobile app with Expo 47.0.0 and debugging it with Expo Go on my iPhone 13 Pro Max. One day, my phone decided to update Expo Go, and then I was not able to run my app. I upgraded the project to SDK 50.0.14, and then the problem appeared.

With SDK 47, decrypting a single message took 0.6-0.7 seconds, whereas with SDK 50, it takes almost 5 seconds!!!

I even tried changing from jsencrypt to node-forge to check if it's a package fault, but no luck.

Has anyone had this problem? Does anyone know what to do about it?

Environment

expo-env-info 1.2.0 environment info:
System:
OS: Windows 10 10.0.19045
Binaries:
Node: 18.14.1 - D:\Software\NodeJS\node.EXE
npm: 9.3.1 - D:\Software\NodeJS\npm.CMD
npmPackages:
expo: ~50.0.14 => 50.0.14
react: 18.2.0 => 18.2.0
react-native: 0.73.6 => 0.73.6
Expo Workflow: managed

Solution

  • Ejecting project to Expo's development build and switching to react-native-fast-rsa completely resolved this problem, significantly reducing the processing time to less than 50ms.

    Full GitHub issue