History log of /libcore/luni/src/test/java/libcore/java/text/CollatorTest.java
Revision Date Author Comments
3df3bfcbad6f4da20964424c4772985d1b1586a1 26-Aug-2015 Rayhaan Jaufeerally <rayhaan@google.com> Revert "Revert "Migrate Collator classes to use ICU4J.""

The SDK build is now fixed by adding icu4j as a dependency of docs.

This reverts commit 5fc822e7ef47448adccd73ca2ebbd28a068f5136.

Change-Id: Ibac9b40189a83323e5175e8ea26c973eb07bc34f
5fc822e7ef47448adccd73ca2ebbd28a068f5136 18-Aug-2015 Neil Fuller <nfuller@google.com> Revert "Migrate Collator classes to use ICU4J."

This reverts commit bf7bbff3a512b3350911d129aba5503dcfde9311.

Change-Id: I5e3d3481d1df11d31871d63fd1575cbf46698dee
bf7bbff3a512b3350911d129aba5503dcfde9311 23-Jul-2015 Rayhaan Jaufeerally <rayhaan@google.com> Migrate Collator classes to use ICU4J.

The following benchmarks have been run and show the performance
gains from calling ICU4J.

----- ICU4J -----
benchmark us linear runtime
CollatorIdentical 6.90 ==============================
CollatorPrimary 3.20 =============
CollatorSecondary 3.79 ================
CollatorTertiary 4.28 ==================
vm: app_process

----- ICU4C -----
benchmark us linear runtime
CollatorIdentical 11.75 ==============================
CollatorPrimary 10.01 =========================
CollatorSecondary 9.88 =========================
CollatorTertiary 10.26 ==========================
vm: app_process

All tests relating to Collation pass after this change.

With respect to CJK character loading time, tests were done on a
Nexus 6 running this change, in the US locale and TRADITIONAL_CHINESE
locale.

In EN-US:
Time to load Traditional Chinese collator after boot: 76ms, 76ms
Time to load again: (39ms, 36ms, 36ms), (36ms, 36ms, 48ms)
In ZH-TW:
Time to load Traditional Chinese collator after boot: 37ms, 36ms
Time to load again: (36ms, 36ms, 36ms), (35ms, 37ms, 35ms)

This seems to indicate the system is creating a Collator on boot meaning
that ICU is caching it after the first creation. So if a device is in the
Traditional Chinese locale, the cost of creating Traditional Chinese
collators should have been absorbed at boot time.

Loading up the CJK ideographs uses up around ~500k of memory. From the
above findings, if the device is in a language requiring those characters
then they should be loaded up on boot in the Zygote, which may mean the
memory is shared across processes wishing to use the data.

Change-Id: I98a1c32c8f58e03d16d694b8a4fca4ced961af8e
55dfcd8b9609f112b0542af6a705080d98e00d2a 18-Apr-2014 ccornelius <ccornelius@google.com> Update collation tests for icu4c 53.

As of ICU 53, rule strings must begin with a reset '&'.
http://www.unicode.org/reports/tr35/tr35-35/tr35-collation.html#Rules

Also, fewer collation elements exist in ICU 53 because ae-ligature maps to
two rather than three logical collation elements. Now the last one
yields only one CollationElementIterator value rather than two.

Finally, it's no longer possible to switch from forward to backward iteration
without calling reset/setOffset/setText. This used to be undefined behavior
but is now checked.

Change-Id: I663a2b229e551cd6f5753ddae0660f813dbbf866
6a3872951c673b7997a30f0400077185315c45f7 07-Aug-2013 Elliott Hughes <enh@google.com> Remove tests for es__TRADITIONAL.

More obsolete stuff.

Bug: 10210892
Change-Id: I4a89a2439e38a173971a5b878430cb547d70871d
3be1277a4644a149c158f99febbab890fc7b708f 09-Jun-2011 claireho <chinglanho@gmail.com> Libcore changes corresponding to ICU4.6 upgrade.

1. libcore_icu_ICU.cpp: ICU resource files format change.
2. OldCharset_SingleByte_ISO_8859_11.java : charset alias name change.
3. CollatorTest.java : Collation key value change.
4. Pattern2Test.java : character property change - pick another char with Me property.

Change-Id: Iff80c6098f5fd7c82b07e41b4532548d98448ad7
cf686df19a9f52169247b06b09587eafcdc9960a 04-Oct-2010 Elliott Hughes <enh@google.com> Fix the default decomposition mode of Collators.

It's unclear why we thought it shouldn't be NO_DECOMPOSITION. That's the
default for both ICU and the RI. This patch undoes the part of the change that
introduced this discrepancy, and undoes a change we made to silence a test
that was warning us about the discrepancy.

Bug: 1635883
Change-Id: Ic0e121e9b10e4f332b04b3cca1946d8bce32c06e
4557728efb66c455a52b7669a8eefef7a9e54854 11-Aug-2010 Jesse Wilson <jessewilson@google.com> Moving tests to be under the libcore.* package.

This is indended to make it easier to run on VMs that restrict the packages
from which application classes can be loaded. For example, on the RI you need
to use the bootclasspath to load these tests.

Change-Id: I52193f35c5fcca18b5a3e1d280505b1e29b388af