App running slowly on Android (device and simulator)

The app is build using SDK 28 and it uses a redux store. On iOS it runs smoothly, on both the simulator and an iPhone 7 plus. On Android, everything is extremely laggy, unusable. As soon as an action is dispatched to reducers, 8 - 10 seconds pass before it re-renders the components. If no redux action is involved, than it runs more or less smoothly (not as smooth as on iOS though). These are the fixes I’ve tried:

  • upgrade all packages
  • switch from storing navigation (react-navigation) state from redux to built-in store
  • switched from redux-thunk to redux-saga
  • standalone apk has the same behavior as Expo client
  • production mode has the same behavior
  • tested on Samsung Galaxy S4, Nexus 5X, Android Simulator API 23 & 26, it’s all the same (slightly improved on Android simulator)

I’ll try detaching, but that isn’t something I want to do on the long run, just to test. Does anybody encountered such issues with Expo?

Hey @stingus,

I have used redux and redux-thunk in a couple projects and haven’t noticed any issues with Android devices. Have you tried to add your redux libraries and minimal logic to a new project to see if you can replicate the behavior?

I haven’t seen any other reports of this degraded Android performance so I’m curious what could be causing it.



Well, I’ve just found the culprit. Our backend uses wsse authentication and I’ve used crypto-js for password encryption on devices. On many iterations (thousands), it just locks the main thread and the JS frames drops to 0. I was wrong about redux, but the encryption was triggered in a thunk and later in a saga and that’s the reason I suspected redux.

Thanks @adamjnav for pointing out it’s not redux’s fault :slight_smile:

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.