I'm working on an Ionic 3 application (for Android only). Everything works great, except that the startup time of my App is a bit long (nothing excessive, but like 4~5 seconds) and some users are complaining about it. I'm pretty sure it is possible to do better as I have other Ionic apps that rarely take more than 2 seconds to launch. (I'm hiding the splash screen myself, once platform.ready()
is called)
Now, I'm already using some of the techniques I often read about : I'm calling enableProdMode()
and compiling with the --prod
flag. I also added ProGuard (wasn't meant to speed things up but can still reduce number of Java classes so why not), and I tried using Crosswalk but it resulted in worse performances.
So I'm looking for the next step : I'm trying to diagnose what happens during the splash screen, and what can I do better. But I can't find a way to get numbers or stats about what takes long and where is the problem. Instinctively, I'd say that reducing the number of Angular classes by refactoring some views and reducing the number of native plugins in my code could help, but I have found no evidence of it.
So my two questions are :
- Is there a way to see what takes time during the splash screen, before
platform.ready
is called ? - Are there general tips such as reducing the number of plugins or classes to improve startup time ?
@NgModule
in myapp.module.ts
has all my pages declared indeclarations
andentryComponents
.