History log of /dalvik/libcore/luni/src/main/java/org/apache/harmony/luni/util/LocaleCache.java
Revision Date Author Comments
771f3129d213c4725c5a78c6a4ae86ea1b015968 27-Jan-2010 Elliott Hughes <enh@google.com> Add a cache to Currency.getInstance(Locale).

Statically there are lots of calls to Currency.getInstance(String) in the
core libraries and only one to Currency.getInstance(Locale). This might
be why the former has a cache but the latter doesn't. Dynamically, looking
up Currency by Locale is a common operation because that one caller --
DecimalFormatSymbols -- is widely used, and it sets up its currency data
eagerly. (Which might be worth coming back and also fixing later.)
0dfef7bc223f18a1372b4c44c822b9cdc5d5f741 21-Nov-2009 Dan Egnor <egnor@google.com> Fix bugs created by caching NumberFormat & DecimalFormatSymbols objects
bb3b16f46964155b9ceead25db1c0e3841ce61a7 18-Nov-2009 Dan Egnor <egnor@google.com> Cache NumberFormat and DecimalFormatSymbols objects in a ThreadLocal,
so they can be reused between multiple instances of Formatter on the
same thread. This speeds up my unscientific benchmark (a number of
printouts involved in a debugging diagnostics output) by 3x, and
should have a similar impact on anyone who uses String.format(),
PrintWriter.format(), and the like.