Android: Splashcreen shows much longer then device.ready() takes to fire

Two main sources of trouble: 1) your code, or 2) plugin code

Re 1): Import as little as possible into app.module.ts. Lazy load all your pages, and make sure the modules you import are not asking for much at startup. Registering providers is fine. But building pages or doing array initialization is not. Also, put nothing in the constructor of app.component.ts. Stick all the hard work in ionViewWillEnter or ngAfterViewInit or a similar life cycle hook.

Re 2) Much harder to diagnose by forum. I’d suggest you mock out all your plugins (for example by using the Ionic Native Mocks package), and then add them in again one by one, and see if that affects your startup time.

3 Likes