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

Skip to content
Commit 4ceb430d authored by Sailesh Nepal's avatar Sailesh Nepal Committed by Usman Abdullah
Browse files

Cache call type icons

Looking at the trace attached to b/28142787 it looks like
CallTypeIconsView.Resources is created frequently. In my local testing
with 9 items in my call log, it was created 23 times on load and 3 more
times on scroll.

According to the trace, creating a Resources object can be expensive.
In one frame decodeBitmap was called 3 times and took 1.4 milliseconds.

This CL works around the issue by caching the Resources object. This
should be ok. The only downside of this is:
  - the cache won't be updated if the DPI variant changes
  - the cache won't be released if we get a memory pressure event

Bug: 28142787
Change-Id: Ibc2ef02f7c92022deabedd70b1af135a10c9df29
(cherry picked from commit 341185547f9d54566055b270f69f1b93f0301c36)
parent d0db4f89
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