I noticed that the method lookupNodeId in this class got quite slow when I had many
entries in the CMS.
It seems to loop through the nodeNames hash values and search for a match and then returns
the key.
I made an additional hash "nodeIds" which is the reverse of the hash mentioned
above so from here this method can lookup the value straight.
I just added this to parseNodeName where the hash is used:
PortalCMSCacheLoader.nodeNames.put(id, node);
| // added this line
| PortalCMSCacheLoader.nodeIds.put(node, id);
And then the lookupNodeId method becomes just:
return (String)nodeIds.get(nodeName);
This improved performance noticeably.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4142692#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...