I've been taking a look at the AOP collections, in particular the performance -- or
obvious lack of.
Under a profiler, I found out that List.size() works a bit more than probably necessary.
It ends up calling, getChildren().size(), which does this sort of thing:
| public Set<Node> getChildren()
| {
| Map m = currentNode.getChildren();
| Set<Node> children = new HashSet<Node>(m.size());
| Iterator i = m.values().iterator();
| while (i.hasNext())
| {
| children.add(new TreeCacheProxyImpl(treeCache, (NodeImpl) i.next()));
| }
|
| return Collections.unmodifiableSet(children);
| }
|
Is there any particular approach that's being taken to hopefully improve this
method's performance?
It seems fairly straightforward to simply have NodeImpl implement NodeSPI, but this
requires the getChildren() return type to change.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3986701#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...