Dex Preoptimization Effects

56 views
Skip to first unread message

Robert Jones

unread,
Nov 2, 2016, 6:09:30 PM11/2/16
to android-porting, Tim Harvey
In an effort to improve the boot time of our Lollipop 5.1.1 port, I enabled the WITH_DEXPREOPT flag in our board config. No optimization filtering flags were added.
However I am slightly surprised by the result. I see a huge improvement on the first-boot time, which I expect, but I also see a significant improvement in all subsequent boot speeds (by 20+ seconds).
Could someone explain this improved boot time on all subsequent boots? I was under the impression that optimization only occurred at the first boot if not preoptimized by the host and then reused that optimized bytecode.

My one explanation is that prior to optimizing everything on the host like I am now, the target's first boot optimization process was only optimizing some fraction of the data (e.g. ignoring prebuilts etc) and therefore had to repeat compilation/interpretation on that data for all subsequent boots. If someone can tell me if I'm on the wrong track or where I can look to confirm my theory that would be greatly appreciated!

Regards,
Robert Jones
Reply all
Reply to author
Forward
0 new messages