How to speed up my app?

when i’m opening my app it taken after 30 sec to open my login window? how to overcome my opening sec into 5

How do you build your app?

ionic run android

Ionic app shows white screen after splash for 14-15 second

Add --prod at the end of the command for a minified and optimized build.

is not working for me

And what should I do with this comment now?


any other config will added to get the perfect out for my query.

What do you mean by ‘is not working’? Do you get an error, or still slow speed up times? Could you please provide some more info? In a normal situation, running a simple app with --prod like ionic cordova run android --prod shouldn’t take more then a couple of seconds to boot up on a normal device.

It could be that you have a blocking process somehow, or you’re not building correctly or you have hundreds of pages. Please provide us something to work with first. Explain what you’ve tried to boost your app etc.

1 Like

when i’m running this command (ionic cordova run android --prod) getting following error.
i dont know what to do i?
[16:56:11] build prod failed: can’t find symbol KeyRegistry exported from module D:/Arul MaNo/Ionic Project
[WARN] Error occurred during command execution from a CLI plugin (@ionic/cli-plugin-cordova). Your plugins may be out of
Error: can’t find symbol KeyRegistry exported from module D:/Arul MaNo/Ionic Project Git/PCMERP/node_modules/@angular/core/src/di/reflective_key.d.ts

Probably some messed up dependencies. Could you please output your ionic info over here and the contents of your package.json?

1 Like

This is my output of Ionic info:

PS D:\Arul MaNo\Ionic Project Git\PCMERP> ionic info

global packages:

@ionic/cli-utils : 1.4.0
Cordova CLI      : 6.5.0
Ionic CLI        : 3.4.0

local packages:

@ionic/app-scripts              : 1.1.3
@ionic/cli-plugin-cordova       : 1.4.0
@ionic/cli-plugin-ionic-angular : 1.3.1
Cordova Platforms               : android 6.1.2
Ionic Framework                 : ionic-angular 2.1.0


Node       : v6.9.1
OS         : Windows 10
Xcode      : not installed
ios-deploy : not installed
ios-sim    : not installed
npm        : 4.5.0


My Package.json:

“name”: “ionic-hello-world”,
“author”: “Ionic Framework”,
“homepage”: “”,
“private”: true,
“scripts”: {
“clean”: “ionic-app-scripts clean”,
“build”: “ionic-app-scripts build”,
“ionic:build”: “ionic-app-scripts build”,
“ionic:serve”: “ionic-app-scripts serve”
“dependencies”: {
"@angular/common": “2.4.8”,
"@angular/compiler": “2.4.8”,
"@angular/compiler-cli": “2.4.8”,
"@angular/core": “2.4.8”,
"@angular/forms": “2.4.8”,
"@angular/http": “2.4.8”,
"@angular/platform-browser": “2.4.8”,
"@angular/platform-browser-dynamic": “2.4.8”,
"@angular/platform-server": “2.4.8”,
"@ionic-native/core": “3.1.0”,
"@ionic-native/splash-screen": “3.1.0”,
"@ionic-native/status-bar": “3.1.0”,
"@ionic/storage": “2.0.0”,
“ionic-angular”: “2.3.0”,
“ionicons”: “3.0.0”,
“rxjs”: “5.0.1”,
“sw-toolbox”: “3.4.0”,
“zone.js”: “0.7.2”
“devDependencies”: {
"@ionic/app-scripts": “1.2.2”,
"@ionic/cli-plugin-cordova": “1.4.0”,
"@ionic/cli-plugin-ionic-angular": “1.3.1”,
“typescript”: “2.0.9”
“cordovaPlugins”: [
“cordovaPlatforms”: [],
“description”: “PCMERP: An Ionic project”

Okay, this is probably due to some outdated dependencies. Please update your framework to the latest version, as well as your ionic app scripts and other dependencies.

1 Like

If you don’t mine please give me a commands(for All updates)

Just compare your package.json to the one from the ionic conference app over here:

change the versions to the latest ones, remove your node_modules and run npm install again to reinstall all dependencies.

1 Like

can i copy paste the same package.json config in my file

If you’re lazy and don’t have any other dependencies in your own project, yes you can. But you probably don’t want to copy over the names and stuff.

1 Like

Ok. i know one thing how to remove node_modules
is this correct command for me to use npm uninstall node_modules

just delete the folder through your terminal or finder. That will do.

1 Like

to hide white screen you must add a loader before init app

  initializeApp() {
	      this.loader = this.loadingCtrl.create({
      content: "Wait ...",
    this.platform.ready().then(() => {
1 Like

Yes a spinner would be nice for the user (if it really takes this long), but if your app has startup times of > 20 seconds you should seriously look at the problems that are causing these enormous loading times.