Details
Description
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.