Looking for tips to reduce the startup time of a Cordova application.
Mine is built for Windows 10 mobile, but I have a high startup time (10-15 seconds) before my deviceready actually fires. Where should I start looking for culprits? Here’s a list of plugins. I believe it’s a vanilla plugin list so I’m not sure what can stay or go.
Also, since Windows 10 UWP already supports JavaScript apps, why would I need to include a plugin for the keyboard?
I’ve reduced the number of plugins, but this made zero difference. From the time the app launches and the deviceready event fires, it’s still 10-15 seconds. I’ve read that an app can take 2 seconds to typically load. The only times I get that speed is when suspending/resuming the app, and that’s only if the phone hasn’t dumped the app from memory.
From what I remember, a UWP JavaScript app starts much faster than Cordova (it’s been a while). I’ll have to do my own testing to confirm.
I may look at removing Cordova entirely and hosting everything in a UWP JavaScript app. This is the first time I’ve coded a Cordova app, so I’m assuming that I have a configuration problem. I could also deploy to other devices (IOS, Android) and see what performance is like there.
In my experience, frameworks/devs are not “completely” committed to Windows platform (Ionic being one of the rare exceptions). It wouldn’t surprise me though, if Cordova ran great on iOS/Android and ran OK on Windows.
You should probably try both: Build a plain “Hello world” UWP JS app and see how long it takes to start. Then also do the same with an empty Cordova/Ionic project and compare. Maybe your device is just not optimal or something like that. When you have these numbers you are sure if it is worth investing more time on trying to fix some possible configuration problem in Cordova.