Optimise loading wallpaper from disk, by skipping unnecessary steps.
Before this optimisation, target user's image wallpaper was being read from disk to memory one byte at a time, which was causing too much CPU consumption and slowness. With this CL, that process is avoided by providing the input stream to ImageDecoder.createSource directly. This CL decreases the average core (without the animations) user switch duration by 36%, from 982.82ms to 633.50ms on a high end tablet device. Impact is expected to be higher on lower end devices. And the standard deviation (spikiness) decreased by 39% from 246.21ms to 151.80ms. This CL also avoids the extra memory consumtion. Which was twice the size of the file. go/optimise-loadwallpaper-during-userswitch-2 Bug: 316331405 Test: Perfetto trace comparison Flag: NONE Change-Id: Idfd8ceaaf9fe3930db2057a6b9adc204991f5139
Loading
Please register or sign in to comment