<div dir="ltr">+1 for JMH<div><br></div><div>Thanks,</div><div>Mohan</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 21, 2014 at 7:00 PM, Romain Manni-Bucau <span dir="ltr"><<a href="mailto:rmannibucau@gmail.com" target="_blank">rmannibucau@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">hmm should it pass TCKs then? ;) /me is joking<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
Romain Manni-Bucau<br>
@rmannibucau<br>
<a href="http://www.tomitribe.com" target="_blank">http://www.tomitribe.com</a><br>
<a href="http://rmannibucau.wordpress.com" target="_blank">http://rmannibucau.wordpress.com</a><br>
<a href="https://github.com/rmannibucau" target="_blank">https://github.com/rmannibucau</a><br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
2014-10-21 15:24 GMT+02:00 Mark Struberg <<a href="mailto:struberg@yahoo.de">struberg@yahoo.de</a>>:<br>
> Hi!<br>
><br>
> Yes, I missed that you changed the test target. It is now not testing proxies but how fast ApplicationScoped beans injected into other ApplicationScoped beans work.<br>
><br>
> I agree that this might be a valid performance optimisation, but people should be aware that this is done. Have seen quite a few 'ServiceHolder' with getters to the actual services in projects where CDI gets used in companion with legacy frameworks.<br>
><br>
> I will add this as another use case to the test suite.<br>
><br>
> LieGrue,<br>
> strub<br>
><br>
><br>
><br>
><br>
>> On Tuesday, 21 October 2014, 14:56, Jozef Hartinger <<a href="mailto:jharting@redhat.com">jharting@redhat.com</a>> wrote:<br>
>> > For certain combinations of scopes this is a perfectly legal<br>
>> optimization ;-) It's even mentioned in the spec (see 6.5.5).<br>
>><br>
>><br>
>> On 10/21/2014 02:46 PM, Mark Struberg wrote:<br>
>>> Folks, you really scare me a bit!<br>
>>><br>
>>> I debugged into it and for the first BeanManger#getReference I get a proxy.<br>
>>><br>
>>> But for all other BeanManager#getReference I get the bare metal<br>
>> SimpleBeanWithoutInterceptor WITHOUT ANY PROXY.<br>
>>> Can you confirm this?<br>
>>> If so, then please tell me how you make this Serializable if it gets stored<br>
>> e.g in a Http Session?<br>
>>><br>
>>><br>
>>> This is just not conform to the CDI spec I fear. I even consider this a<br>
>> blocker bug...<br>
>>><br>
>>> LieGrue,<br>
>>> strub<br>
>>><br>
>>><br>
>>><br>
>>>> On Tuesday, 21 October 2014, 14:07, Jozef Hartinger<br>
>> <<a href="mailto:jharting@redhat.com">jharting@redhat.com</a>> wrote:<br>
>>>>> Btw I've run your benchmark locally and observed the following<br>
>> results:<br>
>>>> OWB 1.2.6: 9827ms<br>
>>>> Weld 2.2.5.Final: 20ms<br>
>>>><br>
>>>> ;-)<br>
>>>><br>
>>>> I did however tweak the test a bit so that Weld's optimizations can<br>
>> be<br>
>>>> leveraged[1]. I admit that in certain situations (like your test<br>
>> without<br>
>>>> my change) Weld performs worse than it should and this is a good input<br>
>>>> for us.<br>
>>>><br>
>>>> As for the NPE you observed not sure what is going on there. Perhaps<br>
>>>> WeldContextControl implementation in DeltaSpike is not really thread<br>
>> safe?<br>
>>>><br>
>>>> Jozef<br>
>>>><br>
>>>> [1] <a href="https://github.com/jharting/cdi-performance/commits/weld" target="_blank">https://github.com/jharting/cdi-performance/commits/weld</a><br>
>>>><br>
>>>> On 10/21/2014 01:43 PM, Jozef Hartinger wrote:<br>
>>>>> Hi Mark,<br>
>>>>><br>
>>>>> thanks for showcasting your new feature. Great to see OWB getting<br>
>>>>> faster! As for the micro benchmark I suggest that you check out<br>
>> JMH[1].<br>
>>>>><br>
>>>>> If you need an input from the Weld team, use<br>
>> <a href="mailto:weld-dev@lists.jboss.org">weld-dev@lists.jboss.org</a><br>
>>>>><br>
>>>>> [1] <a href="http://openjdk.java.net/projects/code-tools/jmh/" target="_blank">http://openjdk.java.net/projects/code-tools/jmh/</a><br>
>>>>><br>
>>>>> On 10/21/2014 11:59 AM, Mark Struberg wrote:<br>
>>>>>> Hi!<br>
>>>>>><br>
>>>>>> Weld folks, I need some help with a micro benchmark:<br>
>>>>>><br>
>>>>>> You know we've talked about disk footprint in SE, so I<br>
>> hacked<br>
>>>> together a small microbenchmark and as a side effect we also got what<br>
>> is really<br>
>>>> needed to have CDI running<br>
>>>>>> <a href="https://github.com/struberg/cdi-performance" target="_blank">https://github.com/struberg/cdi-performance</a><br>
>>>>>><br>
>>>>>> I'm curious about missing some dependency excludes for<br>
>> Weld.<br>
>>>>>><br>
>>>>>> could you please run<br>
>>>>>><br>
>>>>>> $> mvn clean dependency:copy-dependencies<br>
>> -DincludeScope=compile<br>
>>>> -PWeld -Dweld.version=2.2.5.Final<br>
>>>>>> $> ls -al target/dependency/<br>
>>>>>><br>
>>>>>> and tell me which dependencies can be without having some CDI<br>
>>>> functionality missing?<br>
>>>>>> Feel free to pimp the pom and ship a pull request.<br>
>>>>>><br>
>>>>>><br>
>>>>>> txs and LieGrue,<br>
>>>>>> strub<br>
>>>>>> _______________________________________________<br>
>>>>>> cdi-dev mailing list<br>
>>>>>> <a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
>>>>>> <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
>>>>>><br>
>>>>>> Note that for all code provided on this list, the provider<br>
>> licenses the<br>
>>>> code under the Apache License, Version 2<br>
>>>> (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" target="_blank">http://www.apache.org/licenses/LICENSE-2.0.html</a>). For all other ideas<br>
>> provided<br>
>>>> on this list, the provider waives all patent and other intellectual<br>
>> property<br>
>>>> rights inherent in such information.<br>
>>>><br>
>>>>> _______________________________________________<br>
>>>>> cdi-dev mailing list<br>
>>>>> <a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
>>>>> <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
>>>>><br>
>>>>> Note that for all code provided on this list, the provider<br>
>> licenses the<br>
>>>> code under the Apache License, Version 2<br>
>>>> (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" target="_blank">http://www.apache.org/licenses/LICENSE-2.0.html</a>). For all other ideas<br>
>> provided<br>
>>>> on this list, the provider waives all patent and other intellectual<br>
>> property<br>
>>>> rights inherent in such information.<br>
>>>><br>
>><br>
> _______________________________________________<br>
> cdi-dev mailing list<br>
> <a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
><br>
> Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" target="_blank">http://www.apache.org/licenses/LICENSE-2.0.html</a>). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.<br>
<br>
_______________________________________________<br>
cdi-dev mailing list<br>
<a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
<br>
Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" target="_blank">http://www.apache.org/licenses/LICENSE-2.0.html</a>). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.<br>
</div></div></blockquote></div><br></div>