tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Struberg <strub...@yahoo.de>
Subject Re: CDI container performance
Date Tue, 21 Oct 2014 10:42:21 GMT
> * The method 'executeInParallel' uses 'Thread.run'
Oh gosh, txs for catching that. I now did a proper start().

But the numbers did not change much in relation to each other.



By doing so Weld now even blows up with a NPE, so I guess they have some cuncurrency issue
under heavy load.


[main] INFO org.jboss.weld.Bootstrap - WELD-000101 Transactional services not available. Injection
of @Inject UserTransaction not available. Transactional observers will be invoked synchronously.
Exception in thread "Thread-3" java.lang.NullPointerException
    at org.apache.deltaspike.cdise.weld.ContextController.startRequestScope(ContextController.java:147)
    at org.apache.deltaspike.cdise.weld.WeldContextControl.startRequestScope(WeldContextControl.java:161)
    at org.apache.deltaspike.cdise.weld.WeldContextControl.startContext(WeldContextControl.java:70)
    at at.struct.cdi.performance.CdiPerformanceTest$1.run(CdiPerformanceTest.java:56)
    at java.lang.Thread.run(Thread.java:745)


> * Furthermore the start of the Threads should be done in a separate
> loop.
Did that as well now.

I've already updated my github repo with start() and the separate loop.


> * Apart from this the testcase is a little bit skewed as it used
> application scopes.

I gonna add the same for @RequestScoped

We should also add the following use cases
* class with an interceptor annotation on a single method, invoking the intercepted method
* class with an interceptor annotation on a single method, invoking a NON-intercepted method
* class with an interceptor annotation on the class, invoking a method on it

Feel free to ship patches

Just collecting the new numbers and will ping when I'm done.

LieGrue,
strub



> On Tuesday, 21 October 2014, 12:21, Daniel Kasmeroglu <daniel.kasmeroglu@kasisoft.net>
wrote:
> > Am 21.10.2014 um 11:37 schrieb Mark Struberg:
> 
>>  Hi!
>> 
>>  Yesterday I wrote a small micro benchmark to test the performance of some 
> CDI containers. The outcome was pretty stunning - but best if you run it 
> yourself:
>> 
>>  https://github.com/struberg/cdi-performance
>> 
> 
> First of all I didn't check the repo on my system. I only looked at the
> source via the browser so here are some remarks:
> 
> * The method 'executeInParallel' uses 'Thread.run' which just 
> invokes
> the Runnable within the Thread. Therefore it's NOT executing in parallel.
> 
> * Furthermore the start of the Threads should be done in a separate
> loop. Otherwise the system setup of the Thread (the VM management) will
> be mixed into the measurements. The beginning of the measurement could
> be placed after the thread creation:
> 
> -> Thread[] threads = init
> -> begin = nanos
> -> threads.start
> -> threads.join
> -> end = nanos
> 
> * Apart from this the testcase is a little bit skewed as it used
> application scopes. For a comparison with other frameworks it's
> necessary to use a representative set of data points which isn't the
> case for application scopes as they're usually only amount to a small
> fraction of all beans. It would be nice to know about the ratios between
> the scopes in real life applications in order to design appropriate
> scenarios.
> 
> 
> Best regards
> 
> Daniel Kasmeroglu
> 

Mime
View raw message