How to speed up my app?

@ guadyass

Good suggestion - which file do you put the code in?

 initializeApp() {
	      this.loader = this.loadingCtrl.create({
      content: "Wait ...",
	  spinner:"dots" 
    });
	    this.loader.present();
    this.platform.ready().then(() => {
      StatusBar.styleDefault();
      Splashscreen.hide();
	  this.loader.dismiss();

}

You could do that in your app.component.ts.

I don’t see the point of a loading indicator here. Isn’t whatever the problem is likely before it would ever be shown?

Loading action show in after blank page. there was a problem not suited to me?

I have some tips.

Go to config.xml:

    <preference name="SplashShowOnlyFirstTime" value="false" />
    <preference name="SplashMaintainAspectRatio" value="true" />
    <preference name="FadeSplashScreen" value="false" />
    <preference name="FadeSplashScreenDuration" value="0" />
    <preference name="SplashScreen" value="screen" />
    <preference name="SplashScreenDelay" value="0" />
    <preference name="AutoHideSplashScreen" value="false" />

this makes the splash screen load (it stays there all the time)

  • later when the app is done loading (cold start), we control the splash screen by hiding it…
 //app.component.ts
 constructor(
        public platform:Platform,

        public statusBar: StatusBar,
        public splashScreen: SplashScreen
    ) {
	
		//When the platform is ready, we run some codes. (Hide the splash page)
        this.platform.ready().then(
            () => {
				this.statusBar.styleDefault();
				this.splashScreen.hide(); // control to hide the splashScreen yo!
			}
		)
        .catch(
            err => console.log("error: platform.ready()")
        );
    }

then build then run your app again.
$ ionic cordova build android
$ ionic cordova run android

1 Like

Are you using lazy loading for pages?
Lazy loading is best way for reducing time after splash.