3 ms·
> Android keeps an on-disk cache, performing native compilation at installation time, or at first startup after an OS update. If you’re describing what I think
by chrismorgan 7y ago
> Android keeps an on-disk cache, performing native compilation at installation time, or at first startup after an OS update.
If you’re describing what I think you’re describing, that was a Dalvik thing (Android 4.4 and earlier), which ART (Android 5 onwards) doesn’t do. I also found it a pain, because from time to time even when there hadn’t been an OS update or any other such change my phone would take three or four minutes longer to boot up as it decided it had to optimise all its packages. No idea whether that was a typical experience.
- est31 7y agoThe compile target of ART's dex2oat tool is actually native ELF code while Dalvik's dex2opt only created odex files, so the on-disk cache still exists. I've found sources that this is still done on app installation. On whether it's still done on OS updates, I couldn't find sources, but I guess your experiences mean that now OS updates don't trigger recompilations any more. Thanks for the pointer!
- yzmtf2008 7y agoIt still happens, except now the recompilation is done before the reboot for the upgrade, so that it doesn't create a massive downtime for upgrades. But if you manually upgrade, you can still see one (very long) step called "Optimizing Apps".
- pjmlp 7y agoHere is the complete workflow post Android 7. https://source.android.com/devices/tech/dalvik/jit-compiler https://source.android.com/devices/tech/dalvik/jit-compiler