Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipse-dev] NLS.bind(...) vs MessageFormat.format(...)


The memory footprint has nothing to do with whether you use NLS#bind or MessageFormat#format. The memory footprint reduction comes from using the NLS mechanism of defining a Java file and a property file.  The savings from using this can be significant for large applications (if you call several MB of memory significant). More info here:

http://www.eclipse.org/eclipse/platform-core/documents/3.1/message_bundles.html

There is a speed difference between these methods, so for those who care about speed it's still worth using even if you don't care about memory.

John

A seasoned programmer wrote on 04/08/2008 10:03:47 AM:

> PS: As a seasoned programmer, I suggest to forget about NLS and always
> use MessageFormat, because a) the runtime footprint doesn't matter for
> most of the cases (yes, it's different but not noticeably so) and b) you
> don't have to remember a second API and c) chances are that you'll run
> into a case eventually which can't be solved using NLS, so you'll end up
> having to use and maintain two APIs in your code.

Back to the top