[ 
https://issues.apache.org/jira/browse/WW-3637?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13048497#comment-13048497
 ] 

Greg Huber commented on WW-3637:
--------------------------------

Works great.  thanks.

> Auto reload of properties slowing down application
> --------------------------------------------------
>
>                 Key: WW-3637
>                 URL: https://issues.apache.org/jira/browse/WW-3637
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Other
>    Affects Versions: 2.2.3
>         Environment: Centos 5.6, Tomcat-6.0.32, Eclipse Helios
>            Reporter: Greg Huber
>            Assignee: Maurizio Cucchiara
>            Priority: Minor
>             Fix For: 2.3
>
>
> Hello, with this mod WW-3602 
> private static void reloadBundles() {
> ..
> bundlesMap.clear();
> ..
> }
> and mod and struts.devMode=true for me, my app is now so slow its unusable. 
> When submit a page with bundlesMap.clear(); it takes 9 seconds, and when I 
> comment out the line it takes 1 second. The reloadBundles() gets called many 
> times per invocation. 
> I also needed to reload the messages but had to do a work around from my app 
> to call explicitly to remove the resource bundle only once.
> LocalizedTextUtil.removeBundle("ApplicationResources_en_GB");
> modified LocalizedTextUtil added method :
> public static void removeBundle(String resourceBundle) {
> if (reloadBundles) {
> if (bundlesMap.containsKey(resourceBundle)) {
> bundlesMap.remove(resourceBundle);
> }
> }
> }
> From when I last looked at this, what I think it does is to reload the 
> bundles after each time the call to reloadBundles() to get the message from 
> the say UI. Since for me it gets called 20+ times, it has to reload all the 
> bundles this many times per invocation, taking a long time. 
> bundlesMap.clear(); would work if it was called only once at the very start 
> of the invocation. I gave up in the end and did the work around as it was 
> quicker than restarting Tomcat each time.
> Cheers Greg.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to