Ionic App takes 13 secs to load on first open


#1

Hi,

My ionic App takes 13 secs to load on first open.It has alot of images and uses JSON data from within the application (not from a web server). Any ideas how to reduce the load time?

Ionic 2 RC 1


#2

it’s probably (at least partially) because debug is still enabled, i too am struggling to find a way to enable production mode when putting together the apk.


#3

I’m using --release when building so i don’t thin debug would still be on (but i don’t know)


#4

for me the culprit was using cordova build instead of ionic build, and that’s why debugging was still enabled.
Now using
ionic build android --release
and it’s working reasonable (~3-4 sec load), although I am not sure you need the “–release” modifier in RC1.

What you can try and check is to make sure you are displaying the home (a minimium) before doing any heavy lifting. That might require you to make the page lighter, but it might be just an issue with what and when you load for the homepage. Try placing some console.log commands in your loading process and check them directly on the device with the android monitor , so you can see what are the items that take a long time to execute.