Ionic 2 - App opening really slow

Hello guys!

I really like Ionic 2 - but I have some issues regarding performances.

After installing Crosswalk is a bit better.
That means that once I am inside the app it goes kind of smoothly.

The real problem is the opening of the app.

Testing on Android 4.4 it takes 22 seconds to open it.
And about 12-13 seconds to call it from the background.

Is this a general issue?
Do you have similar time for opening the app?

Which version of ionic are you using? I have experienced a lot of improvement in boot time with the release candidates (currently 2.0.0-rc.3) compared to some of the older beta versions.

For more information see:

I have just upgraded to rc3.

The opening time remains the same unfortunately.

Make sure on android, that you’re not seeing a blank splash screen. We thought we were having problems with boot up times for the app on Android versions, and it turned out it was the splash screen playing, but the splash had no content.

Thanks @bsampica. Very good hint!
It may be that main if not the whole cause of the problem.

By now I have reduced the opening time but it is still slow: around 17 seconds.
If restored from background it opens it instantly.
But I think I can manage to reduce it further.

How do how manage to remove that white splashscreen?

This is my code concerning the splashscreen:

App.component:

import { StatusBar, Splashscreen } from 'ionic-native';

hideSplashScreen() 
{
	if (Splashscreen) 
	{
		setTimeout(() => {
			Splashscreen.hide();
		}, 100);
	}
}

Config.xml:

  <preference name="ShowSplashScreen" value="true"/>
  <preference name="AutoHideSplashScreen" value="true"/>
  <preference name="SplashScreen" value="screen"/>
  <preference name="SplashScreenDelay" value="3000"/>
  <preference name="SplashShowOnlyFirstTime" value="false"/>
  <preference name="SplashMaintainAspectRatio" value="true"/>
  <preference name="FadeSplashScreenDuration" value="300"/>
  <feature name="SplashScreen">
    <param name="android-package" value="org.apache.cordova.splashscreen.SplashScreen"/>
    <param name="onload" value="true" />
  </feature>

What do you think?

I have actually tried a blank app with rc3 and the opening time is 15 seconds on android 4

Hi I have the same problem now. My app was running properly with rc3 until I upgraded all of my packages including ionic-app-scripts, angular and typescript.

1 Like

Same issue, the opening time is 15sec also on ios. It appeared since I upgraded to ionic rc4 with its related packages. Does anyone know the reason why?

1 Like

You can try building with --prod
It does work for me.

See another post about the same issue.

Thanks, it does the trick!

As of ionic-app-scripts version 0.0.47 , build commands does not use AoT ( Ahead of time compilation ) by default ,
you have to use --prod to build in production mode that uses AoT.
You can see this mentioned in the ChangeLog

It’s good to keep any eye for major changes when updating .

Any luck in improvimg app launch time ?

Great question!
I postponed to work on this issue to concentrate on other stuff - But as I can see so far even with Ionic 2.0.0 the opening time is slow.

Have you tried any of the new optimisations? https://github.com/driftyco/ionic-app-scripts/releases/tag/v1.1.0

I am sure Ionic would love your feedback on this!