3

I have a React Native app that takes around 3-4 seconds to load initially on my phone. Every load after that it takes < 1 second.

If I clear the storage in Settings on the app, it goes back to slow load like before.

It's running inside of a Fragment. The Activity it's within loads almost instantly, even on first launch.

Does anyone know exactly why, and how to speed it up? I've seen this on both debug and release builds.

ewindsor
  • 885
  • 10
  • 24
  • 1
    Is this such an issue that you have to wait all of 4 seconds when rebuilding? I think perhaps in that case this answer has a pretty detailed answer: [link](https://stackoverflow.com/questions/1554099/why-is-the-android-emulator-so-slow-how-can-we-speed-up-the-android-emulator?rq=1) – Truefeel Mar 30 '17 at 23:33
  • 3
    Thanks, but this is on device. It seems to only happen on first launch / after I clear storage. – ewindsor Mar 31 '17 at 03:11
  • 1
    Have you found a solution for this? i also added a reactActivity to my android project . It takes 1 second before loading – Tiwa Babalola Oct 10 '17 at 08:37
  • I decided to go with an Activity instead of a Fragment, it is quicker but there's still a delay due it needing to get JavaScript Core running. You could also try and update JavaScript Core which will give a slight performance boost: https://github.com/SoftwareMansion/jsc-android-buildscripts – ewindsor Oct 23 '17 at 15:33
  • I'm having same issue. App takes 2-3 seconds to launch at the first and gives a white screen on that period, when it is in ram only take <1 seconds. – Thisara Sudaraka Jun 29 '20 at 09:04

0 Answers0