3 Commits

Author SHA1 Message Date
Adam Lesinski
73f6f9daf6 libandroidfw: Add SparseEntry support for LoadedArsc
go/o-restable-sparse-entries

Test: make libandroidfw_tests
Change-Id: Ib1a7d1fc69008390eee53a1de04356dc50e05b45
2017-11-29 22:19:13 +00:00
Adam Lesinski
873ef0e230 libandroidfw_tests: package test data correctly
- Convert to use soong, which allows bundling test data with benchmarks.
- Also separate libandroidfw_benchmarks so that it doesn't depend
on gtest.

Test: manual
Change-Id: I45bd222fafa87172c77b7f5bb2a7a89ddca72361
2017-10-12 16:02:00 -07:00
Adam Lesinski
c8f71aa67e Add ResTable_sparseTypeEntry support
Benchmarks on bullhead-userdebug show that there is a negligent
performance impact when using sparse entries on a 30% loaded
sparse type of 1000 resources.

Benchmark                                             Time           CPU Iterations
-----------------------------------------------------------------------------------
BM_SparseEntryGetResourceSparseLarge                255 ns        254 ns    2751408
BM_SparseEntryGetResourceNotSparseLarge             254 ns        254 ns    2756534

Bug: 27381711
Test: make libandroidfw_tests aapt2_tests
Change-Id: I051ea22f2f6b2bc3696e446adc9e2a34be18009f
2017-02-15 12:40:02 -08:00