summaryrefslogtreecommitdiff
path: root/libs/androidfw/StringPool.cpp
diff options
context:
space:
mode:
author Yasin Kilicdere <tyk@google.com> 2023-12-14 14:30:07 +0000
committer Yasin Kilicdere <tyk@google.com> 2023-12-14 15:54:29 +0000
commitb90f1d3c9241e61492a03e2094db68954f823007 (patch)
tree3997066e36eb1997e8fe0c994b28665bf667e02b /libs/androidfw/StringPool.cpp
parent0e97a0b24f0d5f5af78aae01a0a58017d6599ea1 (diff)
Optimise loading wallpaper from disk to memory using chunks.
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 optimised by reading in 8 KB chunks via using the readAllBytes() function. This CL decreases the average core (without the animations) user switch duration by 32%, from 815.69ms to 556.66ms on a high end tablet device. Impact is expected to be higher on lower end devices. This CL also halves the memory consumtion since byte array is no more getting duplicated. Bug: 316331405 Test: Perfetto trace comparison Flag: NONE Change-Id: I1d6e556e51b0f81e18174f77edfc85ef7d8bb62a
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions