This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Performance regression in ResourceBundle
- To: java-patches at gcc dot gnu dot org
- Subject: Performance regression in ResourceBundle
- From: Jeff Sturm <jsturm at one-point dot com>
- Date: Tue, 2 Oct 2001 19:56:17 -0400 (EDT)
- cc: green at redhat dot com
I'm seeing a huge slowdown in my application from this patch:
http://gcc.gnu.org/ml/java-patches/2001-q3/msg00409.html
"This patch changes ResourceBundle.tryBundle() to only cache exact
matches. This also has the advantage that you can add locale matching
resource bundles to long running programs by dropping the somewhere in
the classpath."
Searching the classpath is far too expensive for every time I call
tryBundle... 'truss' reveals thousands of unsuccessful open() calls.
Adding a gnu/java/locale/Calendar_en_US class to libgcj helps, though this
isn't a solution for any missing country locale.
I think somehow the failure to find an exact locale match must be cached
while preserving correctness. At the moment I don't have time to look
closely at this, however.
Jeff