summaryrefslogtreecommitdiff
path: root/libs/androidfw/Android.bp
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2018-01-08 17:38:30 -0800
committerAdam Lesinski <adamlesinski@google.com>2018-01-24 15:19:09 -0800
commit64ee69d0f1f412edee2eb7a0c846deebbfa37ef9 (patch)
treea75c88533a52604ac4a4b5decb4ec1c1710d1cc4 /libs/androidfw/Android.bp
parentd9c809c480e22ccced6762268efaa30bb9a6e491 (diff)
libandroidfw: Improve performance of AssetManager2
AssetManager2 relied on creating a list of configurations present in the resource table so as to avoid copying and converting ResTable_config's from the APK on every resource retrieval. ResTable, however, had a better optimization that pruned the configurations that didn't match the currently set configuration. This vastly reduced the number of ResTable_configs to test. In this CL, AssetManager2 follows suite with this optimization and only maintains the filtered ResTable_configs, falling back to the slow path when the configuration is overridden. Test: mma frameworks/base/libs/androidfw Test: adb sync system data Test: adb shell /data/benchmarktest64/libandroidfw_benchmarks/libandroidfw_benchmarks Change-Id: I5d46f8b005a37b72750d00bd75f090e7b5a36f60
Diffstat (limited to 'libs/androidfw/Android.bp')
-rw-r--r--libs/androidfw/Android.bp1
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/androidfw/Android.bp b/libs/androidfw/Android.bp
index 7c9078b164a2..70d52164ff74 100644
--- a/libs/androidfw/Android.bp
+++ b/libs/androidfw/Android.bp
@@ -145,6 +145,7 @@ cc_test {
"tests/TypeWrappers_test.cpp",
"tests/ZipUtils_test.cpp",
],
+ static_libs: ["libgmock"],
target: {
android: {
srcs: [