IONIC startup too slow

Hello team,

Our IONIC 2 Apps startup very slow, can you help us?

HUAWEI over 25 seconds,


Emulator over 9 seconds

Startup takes too much time for my app too It takes 15 to 25 seconds depending on phone’s processing power. I was using RC3 and it’s startup time is much shorter. What has happened between RC3 and 2.0.0 final?

I’m using following command for compiling. But this does not help for startup time.

ionic build android --prod --release

i have read about lazy loading of components. may be that will help you

Have you enabled prod mode in your app?

import { enableProdMode } from '@angular/core';
enableProdMode();

Yes. still I get this:

Native: deviceready did not fire within 5000ms. This can happen when plugins are in an inconsistent state. Try removing plugins from plugins/ and reinstalling them.
main.js:6097 DEVICE READY FIRED AFTER 8108 ms

I can start app in 6 sec with 2.0.0 RC3. But I can start app in 15 sec with 2.0.0 final.

Usually ionic build android --prod --release and enableProdMode should do. Something might have broken in final release. Not sure. You may want to report it to ionic team I believe.

How to report to ionic team? to github or somewhere else? thanks

Ionic’s issue tracker (via GitHub):
http://ionicframework.com/submit-issue/

1 Like

I have the same problem in android and IOS debug and release version app.
and in android after the splash the screen change to white screen for 5 seconds.

Cordova CLI: 6.5.0
Ionic CLI Version: 2.2.3
Ionic App Lib Version: 2.2.1
ios-deploy version: 1.9.1
ios-sim version: 5.0.13
OS: macOS Sierra
Node Version: v7.9.0
Xcode version: Xcode 8.3 Build version 8E162

I also have this problem, several seconds of white screen after the splash before the app shows up. Any solution for this?

You can fix it really simple in your config.xml file

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

So the SPlashscreen only disappears when you call the splashscreen.hide() method in your app.component.ts

Thanks! I tried your solution and it worked!

+1, Device ready after 12 000ms.

Do switch to Ionic 3 and lazy loading.
My application startup passed from more than 20 sec to 3 sec… ! :slight_smile:

1 Like

Am I right that your splash screen will hide after 15000 ms ?

I set this to 15 seconds because I will hide it in the app.component.ts after platform.ready()

It work for me, but how can i reduce the white screen time because when i tray “”, total splash screen is 8 to 9 second, it display 1 second for splash screen and 7 to 8 second extra (i mean white screen but background same as splash screen). i required to set total time 4-5 second for starting my app.
please help me…!

1 Like