My ionic app is taking too long (nearly 47sec) to load


my ionic info is and plugins used are:

cli packages: (C:\Users\DELL\AppData\Roaming\npm\node_modules)

@ionic/cli-utils  : 1.12.0
ionic (Ionic CLI) : 3.12.0

global packages:

cordova (Cordova CLI) : 7.0.1

local packages:

@ionic/app-scripts : 2.1.4
Cordova Platforms  : android 6.2.3
Ionic Framework    : ionic-angular 3.6.1


Node : v6.11.3
npm  : 5.4.2
OS   : Windows 8.1


backend : legacy

cordova-plugin-compat 1.0.0 "Compat"
cordova-plugin-device 1.1.4 "Device"
cordova-plugin-geolocation 2.4.3 "Geolocation"
cordova-plugin-splashscreen 4.0.3 "Splashscreen"
cordova-plugin-statusbar 2.2.2 "StatusBar"
cordova-plugin-whitelist 1.3.1 "Whitelist"
ionic-plugin-keyboard 2.2.1 “Keyboard”

help me to reduce the loading time
am testing on moto x play with 7.1.1 android version with 2GB RAM


are you using --prod with build?


thanks for the reply mate
i used --prod with this

Try to put this on the second line of your main.ts file
import { enableProdMode } from ‘@angular/core’;
then before the bootstrap line put
also when building use --prod so ionic build android --prod

but no change in loading

i forgot to include this
i used

<preference name=“loadUrlTimeoutValue” value=“700000” /

this in my config.xml to overcome this error


also tried this

app is running but taking 47sec to open in both cases