Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit b90f1d3c authored by Yasin Kilicdere's avatar Yasin Kilicdere
Browse files

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
parent 0e97a0b2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment