I am on ionic 3.8 but my is app is taking around 20 sec to open everytime and on samsung galaxy tab android 6.0 it took only 10 sec ??
Post your ionic info
output please.
How are you building your app?
ionic info
cli packages: (C:\Ionic Project\bucket_track\bucket\node_modules)
@ionic/cli-utils : 1.8.1
ionic (Ionic CLI) : 3.8.1
global packages:
Cordova CLI : 7.0.1
local packages:
@ionic/app-scripts : 1.3.7
Cordova Platforms : android 6.2.3 ios 4.4.0
Ionic Framework : ionic-angular 3.2.1
System:
Android SDK Tools : 26.0.2
Node : v7.4.0
npm : 4.0.5
OS : Windows 7
How are you building your app?
ionic cordova build android
Are you using the --prod tag?
Are you building locally?
Both quite old - updating them will surely improve performance.
yep locally no prod tag
Read the changelog of 2.x of app-scripts - did you add vendor.js to your index.html?
Also post your updated ionic info
again.
If you’re actually compilling your .apk file on your computer then I’d strongly suggest using the --prod tag…
ionic cordova build android --prod
You should call with --prod and --release parameters:
ionic cordova build android --prod --release
This will increase the app opening time for sure.
This actually has no influence on app performance at all. It only makes sure this is a release build vs. a development build (that can be debugged).
yes I added vendor.js
in index file an is working fine now no doubt build process is fast but opening app is still taking around 16-18 sec
ionic info
cli packages:
@ionic/cli-utils : 1.8.1
ionic (Ionic CLI) : 3.8.1
global packages:
Cordova CLI : not installed
local packages:
@ionic/app-scripts : 2.1.4
Cordova Platforms : android 6.2.3 ios 4.4.0
Ionic Framework : ionic-angular 3.6.1
System:
Android SDK Tools : 26.0.2
Node : v7.4.0
npm : 4.0.5
OS : Windows 7
@Zlenko
I dont have any issue if it is in development mode and ionic cordova build android --prod
is giving me an error
Error: Type AboutUsPage in C:/Ionic Project/New folder/bucket/src/pages/about-us/about-us.ts is part of the declarations of 2 modules: AppModule in C:/Ionic Project/New folder/bucket/src/app
/app.module.ts and AboutUsPageModule in C:/Ionic Project/New folder/bucket/src/pages/about-us/about-us.module.ts! Please consider moving AboutUsPage in C:/Ionic Project/New folder/bucket/src
/pages/about-us/about-us.ts to a higher module that imports AppModule in C:/Ionic Project/New folder/bucket/src/app/app.module.ts and AboutUsPageModule in C:/Ionic Project/New folder/bucket/
src/pages/about-us/about-us.module.ts. You can also create a new NgModule that exports and includes AboutUsPage in C:/Ionic Project/New folder/bucket/src/pages/about-us/about-us.ts then impo
rt that NgModule in AppModule in C:/Ionic Project/New folder/bucket/src/app/app.module.ts and AboutUsPageModule in C:/Ionic Project/New folder/bucket/src/pages/about-us/about-us.module.ts.
Are you using lazy loading?
If so, remove AboutUsPage
from your app.module.ts
.
If not, remove the about-us.module.ts
file.
So adding vendor.js
fixed that
error?
its working now fine
error?
with the help of --prod within 5 sec its opening
Hi,
If you’ve got your situation resolved don’t forget to like and ‘mark as resolved’ whichever posts here have helped.
@Sujan12
In app now some functions are giving issue
I am getting only one button in footer instead of two buttons
Create a new topic for that, I am sure we can fix that.