Cordova App Initialization Times on iOS, Android, and FirefoxOS

My app Quiz&Learn Python includes an analytics component which logs certain app events completely anonymously to my backend. One piece of the logged data is the app launch time. After several months of collecting the data, I finally added functionality for me to see these launch times in my "app analytics dashboard". Here, I’d like to share that data with you. But let's start with an explanation about the data I'm talking about.

What Is Measured?

The app is using Cordova, and I wanted to measure the load time of my code. So, what I measure is the time from executing a script in my HTML document’s HEAD to the deviceready event firing. This, of course, isn’t the app launch time as the native code will need to be executed and the HTML loaded into the webview. But, this is the part of the app where my decisions make the most difference. That makes it also the part I’m most interested in measuring.

Oh, and the app is using Cordova 3.4.0. And, so far there have been over 33,000 loadtimes logged on Android, over 6,900 on iOS, and over 750 on FirefoxOS.

The Data

Here are the loadtime averages (in milliseconds) for each supported platform:

I don’t know how Amazon FireOS has ended up in the list, as the app is not available in the Amazon store. And, while it’s interesting that it has the shortest loadtime at 538ms, the number of data points is really low (like, 8 to be exact). iOS and Android are quite even, with Android slightly faster. FirefoxOS is a lot slower with over 1500ms loadtime on average. This is nothing surprising, though, as the FFOS phones are mostly low-end devices.

Let’s go to the more detailed stats of different versions of an OS, starting with iOS:

Overall, there’s a nice trend of the loadtime decreasing with each new OS version. The exception seems to be 8.1, which was somewhat slower than 8.0.2. But, this could just be a coincidence and I’m not at all saying that it was slower than 8.0.2. Just that it’s slower in the set of data I have collected.

Now, on Android, the trend isn’t nearly as consistent:

The newer OSs don’t neatly decrease the loadtimes. Instead, it seems pretty random. This is probably due to the high number of different devices (944) and limited amount of data I have, as I find it hard to believe that there could be such significant differences between consecutive versions. Still, it is worth pointing out that 4.0.4 (the slowest at 1885ms; I’m ignoring the single event on Taurus 4.1.2) takes almost four times as much time to load as 4.4.3 (the fastest at 478ms).

Here are the results for FirefoxOS:

Like mentioned, these are quite a bit slower, on average, than iOS and Android. Even the fastest version takes over a second to parse the HTML, CSS, and JavaScript of my app.

The Takeaway

There isn’t much to take away from these numbers. It is surprising that only iOS has a nice trend of every OS version improves the load time. This is most probably explained by the small number of iOS devices compared to the more fragmented Android market (27 different iOS devices vs 944 Android devices). What’s going to be interesting (for me at least) is to compare these numbers from app version to app version. But even then, the constantly increasing power of the devices might be more of a cause to faster loadtimes than the optimizations I do in my app.