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 ?