Neut
Neut

Reputation: 79

Ionic 1 vs Ionic 2 app load times

The bare minimum app created with Ionic 1 ("ionic start blank") takes less than ONE second to load on my android device (HTC 816) while a minimal Ionic 2 app ("ionic start blank --v2") takes more than 10 seconds! On the SAME device! Why is that?

I tried everything I could think of, like release build instead on debug, Crosswalk, removing ALL plugins and I even removed ALL html and unnecessary code from the app! But still, the ionic 2 app takes more than 10 seconds to load. shouldn't angular2/ionic2 have better performance!

Ionic 1 app takes 2.5megs on the device while 4.5megs for ionic 2

Am I missing anything here? I mean 10 seconds! vs less than a second! come on!

Any reply is very appreciated :)

Upvotes: 2

Views: 441

Answers (1)

Yasir
Yasir

Reputation: 1399

the load time of v2 compared to v1 is more, but using --prod flag reduces it significantly ionic build android --prod currently i have 13 components , 10 plugins , 2 directives , and 3 service.... the app takes more than 6 seconds after the splashscreen to load.

I have done quite some research on this issue.. the loading has improved since RC.5 and Im hoping it continues improving down the road... if they only do something about NavController where lazy loading is possible and not load all the modules at once , it would drastically improve loading time.... for now make sure you have everything up to latest version (e.g. ionic-native , adding plugins with ionic add , and try using life cycle event like ngOnInit ionViewDidLoad rather than constructor on most pages(its depends)) and use --prodflag when running/building.

Upvotes: 1

Related Questions