This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
The localizer for options package alone consumes about ~130KB of heap, while other localizers onsume additional ~50KB. Especially in the case of options, this is clearly waste, as the localizer is hardly used during normal usage. It should be possible to rearrange the localizer implementation to not keep the bundle in memory (e.g. use NbBundle.getMessage(bundleClass, key) instead of bundle.getString). But keep in mind that the localizers are chained, it is needed to arrange them so the options localizer will be the last asked (or generally order them by hit probability). The goal is to: 1. Not keep options localizer in memory 2. Not parse it during startup Please note that the NbBundle managed bundles are cached using TimedSoftReference, so there shouldn't be any new performance problem.
In the long-term we would like to get rid of the whole LocaleSupport completely. However it will require significant changes. I will try to make changes even for 3.6 but I cannot guarantee whether it will be OK (e.g. from a performance point of view etc.) so I'm leaving promoD as target for now.
I've done two changes: 1) removed cache for retrieved strings in LocaleSupport 2) bundle class is stored insdide NbLocalizer instead of the actual bundle. Both changes seem to have no or little negative impact on performance. They should have positive effect on memory consumption though. I've tested overall editor performance, file opening, find dialog and tools->options->editor settings appearance. Integrated in maintrunk: Checking in libsrc/org/netbeans/editor/LocaleSupport.java; /cvs/editor/libsrc/org/netbeans/editor/LocaleSupport.java,v <-- LocaleSupport.java new revision: 1.12; previous revision: 1.11 done Processing log script arguments... More commits to come... Checking in src/org/netbeans/modules/editor/NbLocalizer.java; /cvs/editor/src/org/netbeans/modules/editor/NbLocalizer.java,v <-- NbLocalizer.java new revision: 1.7; previous revision: 1.6 Petre, thanks for reporting this issue.
Petre, could you please verify thsi issue? Thanks.
Yes, it is OK now.