Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.
This repository was archived by the owner on May 1, 2020. It is now read-only.

very slow startup time with ionic 2.0.0 final #713

@coolman7

Description

@coolman7

Short description of the problem:

Android apps created with Ionic 2.0.0 final that starts very slow: about 15-25 seconds depending on phone processor speed. I get following message at console:

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

What behavior are you expecting?

5-7 seconds of startup time

Steps to reproduce:

  1. ionic start test --v2
  2. cd test
  3. ionic platform add android
  4. ionic build android --prod
  5. Change main.ts file as this and repeat step 4. Both scenarios gave same result:
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app.module';
platformBrowserDynamic().bootstrapModule(AppModule);

I added modified as these:

import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app.module';
import { enableProdMode } from '@angular/core';
enableProdMode();
platformBrowserDynamic().bootstrapModule(AppModule);

Which @ionic/app-scripts version are you using?

$ ionic info
Your system information:
Cordova CLI: 6.5.0 
Ionic Framework Version: 2.0.0
Ionic CLI Version: 2.1.14
Ionic App Lib Version: 2.1.7
Ionic App Scripts Version: 1.0.0
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Linux 4.4
Node Version: v6.9.5
Xcode version: Not installed

Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)

https://forum.ionicframework.com/t/ionic-2-startup-too-slow/78591/3

I also have these lines at package.json file:

  "scripts": {
    "clean": "ionic-app-scripts clean",
    "build": "ionic-app-scripts build",
    "ionic:build": "ionic-app-scripts build",
    "ionic:serve": "ionic-app-scripts serve"
  },

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions