summaryrefslogtreecommitdiff
path: root/libs/androidfw/ConfigDescription.cpp
diff options
context:
space:
mode:
author Yurii Zubrytskyi <zyy@google.com> 2023-05-10 13:16:23 -0700
committer Yurii Zubrytskyi <zyy@google.com> 2023-07-11 15:15:23 -0700
commit657f3c6bbfb7b0a7782562c5de5fd1aecc1346b3 (patch)
treee6e930c06b62474316cc4cacf41ade88932a93af /libs/androidfw/ConfigDescription.cpp
parent1cf74939f4623609341f1dd9b69616da88482c58 (diff)
[res] Speed up AssetManager pointer locking
AssetManager needs to lock (promote()) apk asset weak pointers to use them in pretty much any operation, and often mulitple times for the same object. This CL introduces a concept of an 'operation' in AssetManager, and adds a cache for the locked assets that are retained until the end of that operation. This way we only need to lock each assets object exactly once, losing pretty much no performance. Benchmarks all returned to the pre-memory-safe state values. Bug: 280951693 Bug: 197260547 Bug: 276922628 Test: UTs + native benchmarks + java benchmarks + boot (cherry-picked from https://googleplex-android-review.git.corp.google.com/c/platform/frameworks/base/+/23146856) Merged-In: I26ef88df4f6267b5e8b89f1588f2382db74030c0 Change-Id: I26ef88df4f6267b5e8b89f1588f2382db74030c0
Diffstat (limited to 'libs/androidfw/ConfigDescription.cpp')
0 files changed, 0 insertions, 0 deletions