You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Adrian Crum (JIRA)" <ji...@apache.org> on 2011/04/29 13:36:03 UTC
[jira] [Commented] (OFBIZ-4268) ResourceBundleMapWrapper memory
usage improvement
[ https://issues.apache.org/jira/browse/OFBIZ-4268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13026938#comment-13026938 ]
Adrian Crum commented on OFBIZ-4268:
------------------------------------
Phillipe,
I believe the main purpose of ResourceBundleMapWrapper is to provide a read-only Map interface for ResourceBundle objects. It also implements a MapStack - so multiple bundles can be accessed from a single object. The most common use of this class is the "uiLabelMap" you see used throughout the project.
A while ago I tried to clean up that class (rev 618892) but I had to revert my changes because they introduced a lot of bugs. So, while you're working on this be aware of unintended side effects.
> ResourceBundleMapWrapper memory usage improvement
> -------------------------------------------------
>
> Key: OFBIZ-4268
> URL: https://issues.apache.org/jira/browse/OFBIZ-4268
> Project: OFBiz
> Issue Type: Improvement
> Components: framework
> Affects Versions: SVN trunk
> Reporter: Philippe Mouawad
> Labels: MEMORY, PERFORMANCE
>
> Hello,
> We are working on performance improvements while load testing the application, and I noticed that ResourceBundleMapWrapper uses arounbd 140 Ko per Serving thread, in our configuration with around 1000 thread, this is a big memory impact.
> I started investigating the class and code seems strange to me, in fact I don't understand why InternalRbmWrapper constructor copies creates a Map by copying content of ResourceBundle.
> Why not only have a reference and delegate calls to the ResourceBundle ?
> Furthermore since put methods throw RuntimeException, I really don't see any case where the Map will change.
> I made a test removing this code and delegating to resourceBundle and it seems OK.
> If someone knows why it was made like that I would really be interested, if there is no reason I will submit a patch
> Thank you
> Regards
> Philippe
> http://www.ubik-ingenierie.com
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira