4 ms·
"...an application’s first start-up will be much increased compared to an equivalent Dalvik system." Any thoughts on why they they are compiling to native on f
by andyjohnson0 12y ago
"...an application’s first start-up will be much increased compared to an equivalent Dalvik system."
Any thoughts on why they they are compiling to native on first run, rather than at install-time?
Often a user will want to run immediately after install, but my feeling is that people are less likely to be frustrated by a longer install time than having to wait for an app to start-up.
Edit: Izacus and InclinedPlane say that AOT compilation is at install-time and the article is wrong.
- cpeterso 12y agoIt seems like the AOT compilation could be scheduled asynchronously after install. You don't need to prolong install wait for the user. If they don't open the app right away, then the first run will be fast because AOT should have completed by then. If the user tries to open the app before AOT has completed, then the first run will have to block for AOT to complete.
- keletappi 12y agoMaybe auto-updating apps? It could be that the compilation is resource-intensive enough that it would slow down whatever user is currently doing when an app is updated in the background.
- InclinedPlane 12y agoThey are compiling to native at install-time (or on first boot if you're upgrading to ART on an existing device). I'm not sure exactly what overhead is happening on first run that would cause a slow down compared to Dalvik.
- ohazi 12y ago> Any thoughts on why they they are compiling to native on first run, rather than at install-time? Or why they don't do it on the server so that you get the specialized binary directly from Google Play? Why should my phone be compiling anything?
- pjmlp 12y agoThis is Microsoft's approach.
- deleted 12y ago[deleted]
- vetinari 12y agoBecause you can also sideload apps. Or because Android != Google Experience (i.e. Play Store). Why do you want to be dependent on middleman?
- izacus 12y agoBecause Android ecosystem isn't locked down to a single app store that would prepare binaries for all 8000+ devices with several hundred different SoCs. The device itself is by far most capable of choosing optimal compiler optimizations for it's own SoC.
- izacus 12y agoActually Android 5.0 runs optimization pass as part of install, not first run. The article is incorrect in that aspect.
- andyjohnson0 12y agoThanks for confirming this.