[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ResourceBundle optimisation

From: Bryce McKinlay
Subject: Re: ResourceBundle optimisation
Date: Wed, 06 Jul 2005 22:57:23 -0400
User-agent: Mozilla Thunderbird 1.0 (X11/20041206)

Nicolas Geoffray wrote:

My mistake, i gave you a patch against classpath-0.13. Here's a patch against the latest cvs.

Nicolas Geoffray wrote:

Hi everyone,

I've been doing benchmarks beween my vm and another one launching Tomcat and noticed that the startup spent a long time trying to find Resouces with getBundle. The thing is, ResourceBundle uses a cache for the resources it founds, but i think it's not perfectly used.

When getBundle is entered, it first tries to find the resource in the cache. If it's not found, it calls tryBundle. Then tryBundle tries to load ressources with different locales, but never searches in the cache, allthough it could.

I made a patch for it and gained 2 minutes during startup of tomcat (using an ibook 500Mhz). It's attached.

Hi Nicolas,

I don't think this patch is correct. If an application requests the same bundle baseName, but with a different locale, the locale argument will be ignored and the first bundle placed in the cache will be returned.

Never the less, I'd be interested to know where the 2 minute speedup came from, and if there is anything we can do to improve ResourceBundle without breaking its semantics. Does Tomcat request the same bundle baseName for many different locales?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]