Make Ionic2+ start up fast

Hi folks,

I am currently working on my first Ionic app (currently using V3) and I was experiencing quiet bad performance with regards to the App start on a physical Android device:

  • Starting the Cordova “container” (while seeing the Splash Screen) : 3-5 sec
  • Start the Angular app inside the container (while only seeing a what page): 6-8 sec

So in total more then 10 sec usually – which almost made me consider switching to native development.

But then I came about the very easy solution, which reduces the Angular start time to almost 0:

Just add the –prod flag in the ionic run command – that’s it! So the command would then be something like this:

ionic run android –device –prod

Then Ionic does some optimizations during the build. The one small downside is: the build time is now considerably longer (2-3 time as long).

 

Since a lot of people seems to have the same problem / question and this simple solution is not included in the post in Stackoverflow or alike, I think it might be worth typing a small blog about this (my first blog by the way 😉 )…

Hope that helps you, too!