[jboss-user] [JBoss Microcontainer Development] New message: "Re: Profiling the dependency project"

Kabir Khan do-not-reply at jboss.com
Tue Feb 9 15:38:09 EST 2010


User development,

A new message was posted in the thread "Profiling the dependency project":

http://community.jboss.org/message/525227#525227

Author  : Kabir Khan
Profile : http://community.jboss.org/people/kabir.khan@jboss.com

Message:
--------------------------------------------------------------
Regarding the contextsByState sets
> - Try a normal synchronized HashSet (need to make sure first that the way we use it we don't iterate over the entries)
>From what I can see, all usage within the main sources seem to be with the read/writeLock taken so we could possibly just use a plain HashSet, apart from this in AbstractContextRegistry:
 
> *public* Set<ControllerContext> getContextsByState(ControllerState state)
> 
>    {
> 
> *return* controller.getContextsByState(state);
> 
>    }
I can't see any usage of this, so I am unsure what the consequences of exposing this would be?
 
Average time in ms for 10,000 contexts in the correct order:
-1850 with COWAS
-1074 with plain HashSet
 
Average time in ms for 500 contexts in the wrong order:
-1140 with COWAS
-1180 with plain HashSet
 
However since getContextsByState() is in the spi and its implemetation is straightforward we probably want some flavour of concurrent set, so I'll look at the FastCopyHashMap implementation
> *public* Set<ControllerContext> getContextsByState(ControllerState state)
> 
>    {
> 
> *return* contextsByState.get(state);
> 
>    }

--------------------------------------------------------------

To reply to this message visit the message page: http://community.jboss.org/message/525227#525227




More information about the jboss-user mailing list