Working on ionic 3.8 takes around 20 sec

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?

1 Like

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?

2 Likes

Both quite old - updating them will surely improve performance.

1 Like

@Sujan12
updated appscripts now getting
webpackJsonp is not defined

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.

1 Like

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
1 Like

You should call with --prod and --release parameters:
ionic cordova build android --prod --release

This will increase the app opening time for sure.

1 Like

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).

1 Like

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.

2 Likes

So adding vendor.js fixed that

error?

1 Like

its working now fine
error?
with the help of --prod within 5 sec its opening

1 Like

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.

1 Like