This is a bug in dexopt. Sometimes it crashes, not being able to produce the optimized oat file. This causes PackageManager to invoke it again and again on each boot.
Run "adb logcat > log.txt" while booting and look for a line containing dex2oat.
For me too it happened with the Google Photos app.