summaryrefslogtreecommitdiff
path: root/tools/aapt/StringPool.h
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2012-03-16 19:25:20 -0700
committerJeff Brown <jeffbrown@google.com>2012-03-16 22:25:15 -0700
commitc9fd9263feedac32e4f5b1f13a3246347efdc25f (patch)
tree034a4002a842eae595f59f5d78d982e6316fb13d /tools/aapt/StringPool.h
parent61361f376b47d45966b1ca0d24d51622304c93c3 (diff)
Use quicksort to sort the string pool.
The current implementation of Vector::sort uses insertion sort on the assumption that the data is mostly sorted. It isn't. This change brings the total time spent sorting packages by config down to 500ms from about 93 seconds. Bug: 6186278 Change-Id: Iec8da11e09297acd6c73733d063b0fa9dacf69f7
Diffstat (limited to 'tools/aapt/StringPool.h')
-rw-r--r--tools/aapt/StringPool.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/aapt/StringPool.h b/tools/aapt/StringPool.h
index 060dc6811c8b..d5010086b292 100644
--- a/tools/aapt/StringPool.h
+++ b/tools/aapt/StringPool.h
@@ -139,7 +139,7 @@ public:
const Vector<size_t>* offsetsForString(const String16& val) const;
private:
- static int config_sort(const size_t* lhs, const size_t* rhs, void* state);
+ static int config_sort(void* state, const void* lhs, const void* rhs);
const bool mUTF8;