Heavy dex2oat operation when new user is created

16 views
Skip to first unread message

Oleksandr Tereshchuk

unread,
Feb 5, 2018, 9:49:19 AM2/5/18
to android-platform
Hi,

TL;DR;
/system/bin/dex2oat is eating up to 30% CPU when new user is created. Is there a way to avoid that ?

More details:
I've noticed that on devices with significant amount of non-predexed applications on system image, creation of secondary users is very slow.
You always have user "0" - usually, all applications there are optimized during first boot.
But it seems very strange that same optimization process repeats for each new user (those with id "10", "11" and etc.)

AFAIK dex2oat process tunes code for specific hardware so same optimized oat files should work regardless of owning user (meaning you can simply copy oat files instead of generating them again).
Does this process customizable or I'm getting something horribly wrong ?
Reply all
Reply to author
Forward
0 new messages