11 Commits

Author SHA1 Message Date
Jeff Brown
fe75d62eba Use qsort_r_compat() as a portable wrapper for qsort_r().
Change-Id: Ie79f81625947f4e95122047605d994c86e872e74
2012-03-19 14:08:58 -07:00
Jeff Brown
80a6b33be2 Fix build break on glibc, for real.
Change-Id: I8bbec237229b05f96c708d41f3c4da17e2a90e2b
2012-03-19 12:02:10 -07:00
Jeff Brown
c9fd9263fe 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
2012-03-16 22:25:15 -07:00
Jeff Brown
345b7eb874 Remove dead code in StringPool.
The sorted string pool option was no longer used.
Neither were strings with associated identifiers.

Change-Id: Ic5f6368637fbeedfda873d63f4ad0f3ea9d0d603
2012-03-16 15:25:17 -07:00
Jeff Brown
8a9cfcc852 Make StringPool entry types trivially movable.
Change-Id: If93957a840a0f1cae2e6ef291eeeb1b0c7c20958
2012-03-16 15:24:32 -07:00
Mathias Agopian
b13b9bdad2 frameworks/base refactoring.
step 2: move libutils headers to their new home: androidfw

Change-Id: I14624ba23db92a81f2cb929f104386e1fab293ef
2012-02-17 19:01:26 -08:00
Dianne Hackborn
6c997a9e88 aapt now sorts the strings in the resource string pool.
In our current environment with very many translations, this can
save a lot of RAM -- for example over 200K in Gmail just by sorting
the strings in the Gmail .apk (not the framework).

Also add a new aapt command to print the contents of the resource
table string pool.

Change-Id: I1da037b3e2c377b890833ff57ab158965314ac48
2012-01-31 15:41:30 -08:00
Kenny Root
19138468ca Optional use of UTF-8 strings in resource bundles
Allows the use of UTF-8 for packing resources instead of the
default of UTF-16 for Java. When strings are extracted from the
ResStringPool, they are converted to UTF-16 and the result is
cached for subsequent calls.

When using aapt to package, add in the "-8" switch to pack the
resources using UTF-8. This will result in the value, key, and
type strings as well as the compiled XML string values taking
significantly less space in the final application package in
most scenarios.

Change-Id: I129483f8b3d3b1c5869dced05cb525e494a6c83a
2009-12-07 15:14:15 -08:00
The Android Open Source Project
9066cfe988 auto import from //depot/cupcake/@135843 2009-03-03 19:31:44 -08:00
The Android Open Source Project
d83a98f4ce auto import from //depot/cupcake/@135843 2009-03-03 18:28:45 -08:00
The Android Open Source Project
54b6cfa9a9 Initial Contribution 2008-10-21 07:00:00 -07:00