Ionic 2 builded application (IOS, Android) slow at

2020-06-23 05:48发布

问题:

I am building a app using ionic 2, angular 2 and typescript.

Currently, the released application(IOS & Android) boot up time very slow at the mobile devices.

Even the start template with some UI need to load 5 seconds at iPhone 6, 6 second on oneplus 3. This speed too slow and can't accept. My app is more complicated that takes like 10 second to boot to a front page.

My code to start the app.

ionic start test --v2 --ts

Can the boot time improved to a acceptable level?

回答1:

Ionic 2 new RC4 changed the building process. Now app can be built with AoT using

ionic run android --prod

For more info check out this issue on ionic

Edit

Ionic-cli 3 further modularize it and cordova commands needs ionic cordova. so you need to run it like

ionic cordova run android --prod