Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-core-dev] Re: New platform NLS support


Several people have asked questions about this already.  Here are a few general answers to avoid some duplicate discussion:

Q: It uses reflection... does this make it slower?

A: No.  We profiled bundle loading on VMs from several vendors and the new API loads bundles from 5% to 45% faster, depending on the VM and operating system.  While improving load speed was not the main goal, the new mechanism is faster.

Q: It sounds like a lot of work... is it really worth it?

A: Yes.  High memory usage is an Eclipse bug and it is worth investing time to fix it.  With the conversion tool a plug-in can be converted to the new format in about 20 minutes.

Q: Can't we get similar gains by using shorter message keys and removing unused messages?

A: These techniques are still available with the new NLS support.  You can convert to the new mechanism *and* shorten your message keys to achieve further memory space reductions.  Finding unused messages is now a simple Java reference search on the field for the key.



John Arthorne/Ottawa/IBM

22/02/2005 03:22 PM

To
platform-core-dev@xxxxxxxxxxx, eclipse-dev@xxxxxxxxxxx
cc
Subject
New platform NLS support




Eclipse 3.1 M5 has introduced a new resource bundle mechanism that is significantly more efficient than the standard Java property resource bundle mechanism.  This new mechanism stores each messages as a static field whose value is bound at runtime based on the current locale.  The result is that message keys are no longer stored in memory as strings, and the overhead of the Hashtable used by property resource bundle is eliminated.  More details on the new API, along with analysis of its performance and a conversion tool for those using property resource bundles, is found here:

http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-core-home/documents/3.1/message_bundles.html

Questions on this new API are welcome on the platform-core-dev mailing list.

Back to the top