summaryrefslogtreecommitdiff
path: root/libs/androidfw/BackupHelpers.cpp
diff options
context:
space:
mode:
author Yasin Kilicdere <tyk@google.com> 2024-01-04 17:39:33 +0000
committer Yasin Kilicdere <tyk@google.com> 2024-01-05 15:35:44 +0000
commit16253de0e32a4522e16812ec98449fe080d7c61e (patch)
treec5d6e74348899bc36860175bbe9097669534b479 /libs/androidfw/BackupHelpers.cpp
parentbf4d2e055c9de9a712666ed862bd0724513e7cb8 (diff)
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
Diffstat (limited to 'libs/androidfw/BackupHelpers.cpp')
0 files changed, 0 insertions, 0 deletions