About Ahead of Time Compiling in Ionic 2


Hello there!
I’m using the latest version of Ionic, but my boot time still sucks, and its taking 15 seconds to boot an app size 8mb with just a few plugins… I read about the Ahead of Time (Aot) would be included in the latest version. That’s my ionic info:

Cordova CLI: 6.4.0
Ionic CLI Version: 2.1.8
Ionic App Lib Version: 2.1.4
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Linux 3.16
Node Version: v7.1.0
Xcode version: Not installed

Why is my app taking so long to boot? Do i have to do something to use AoT on my project?


Boot where? On Android? On iOS (probably not since you don’t have Xcode installed)?

Or do you mean the build time when starting the app for local development with ionic serve? (That’s not really the “boot” time.)


I’m running on Android,


Then AoT template compilation should happen by default, you don’t need to do anything.


On which device did you face a 15s boot time?

In my case I noticed a stighly difference between emulating my app with XCode on my computer (2 sec boot time) or on a real device like iPhone 6 maybe 5-6 sec till 9s-more on an iPhone4 … maybe are you experiencing 15s on an old phone?