On Thu, Jan 6, 2011 at 2:35 PM, David Blevins <[email protected]> wrote:
> On Dec 31, 2010, at 1:31 PM, David Jencks wrote:
>
>> Some of these ideas are implemented in the patch attached to 
>> https://issues.apache.org/jira/browse/OWB-511
>>
>> thanks
>> david jencks
>>
>> On Dec 31, 2010, at 12:02 PM, David Jencks wrote:
>>
>>> I looked at the WebBeansContext recently and was a little surprised at what 
>>> it does and doesn't do.  I wonder if what I want it to do is what David 
>>> Blevins was thinking of as "next steps".
>
> You pretty much got it.  The changes are a good next step.  We still have a 
> ways to go as in OpenWebBeans proper (using the DefaultSingletonService) we 
> still get most our hits through the static access to ServiceLoader.
>
> 68639 org.apache.webbeans.corespi.ServiceLoader
> 34129 org.apache.webbeans.util.AnnotationUtil
> 6063 org.apache.webbeans.util.WebBeansUtil
> 2170 org.apache.webbeans.test.TestContext
> 1832 org.apache.webbeans.component.AbstractOwbBean
> 1464 org.apache.webbeans.intercept.WebBeansInterceptorConfig
> 1402 org.apache.webbeans.inject.impl.InjectionPointFactory
> 1170 org.apache.webbeans.decorator.WebBeansDecoratorConfig

Nice, your last change got us down another 200 or so static sync calls:

  OWB-503 status: 565 code uses
  Total of 94975 static synchronized accesses and 95398 hashed calls
in 340 tests
  Average of 279 static synchronized accesses and 280 hashed calls per test

The hashed calls count is no longer accurate as I haven't updated my
tracking hooks to count the new services map, but the static
synchronized is still good.

Here are the next top 10:

65558 org.apache.webbeans.context.ContextFactory
7976 org.apache.webbeans.util.WebBeansUtil
2420 org.apache.webbeans.intercept.WebBeansInterceptorConfig
2288 org.apache.webbeans.config.DefinitionUtil
2178 org.apache.webbeans.test.TestContext
1833 org.apache.webbeans.component.AbstractOwbBean
1622 org.apache.webbeans.inject.impl.InjectionPointFactory
1254 org.apache.webbeans.event.EventUtil
1168 org.apache.webbeans.decorator.WebBeansDecoratorConfig
 940 org.apache.webbeans.deployment.StereoTypeModel

Just de-static'd the ContextFactory, and now we're down another 200~ per test

  OWB-503 status: 615 code uses
  Total of 28894 static synchronized accesses and 29317 hashed calls
in 340 tests
  Average of 84 static synchronized accesses and 86 hashed calls per test

-David

Reply via email to