NavController Push taking time

Hi,

I am using Ionic 3 and i am getting issue in changing pages. Pages are taking 2/3 second to change. I am using simple code:

this.navCtrl.push('MyPage');

Don’t know why this is happening. Please let me know how to fix this.

Thanks

Could you show the entire components code? Are you getting any errors on your logs and how does your other component (which you’re opening) looks like?

Ionic cordova run android --prod This command solved my issue. Now app is running smooth and super fast.

Yes, do you know the difference and why this makes it faster? If you run without --prod, it will build with JIT compilation. So everything get’s compiled at runtime. With --prod, your project is being build with AOT, ahead of time compilation. This should make your app much faster and leaner, but I guess you’ve experience that by now. :wink:

Yes i read this thing somewhere and used this command first time. But the problem with this command is, It takes around 4-5 minutes to launch apk in android phone.