Holy cow! Can I borrow your notebook? ;). On Sunday, August 4, 2013, Mark Struberg wrote:
> JFTR: in Apache OpenWebBeans we switched to ASM because Javassist caused > too much mem leaks and hassles. > > But we do only use reflection when it's really needed. Means methods which > are neither delegated nor intercepted will delegated via native java calls. > The same happens for 'NormalScoped' proxies (a CDI specialty) which only > use pure java code and no reflection. > > That said, a few figures: 10 million invocations on the proxies we > generate using ASM (which do the getInstance() internally as well -> > ThreadLocal, Map lookup, etc) take 30ms on my notebook. > > LieGrue, > strub > > > > > ----- Original Message ----- > > From: Romain Manni-Bucau <rmannibu...@gmail.com> > > To: Commons Developers List <dev@commons.apache.org> > > Cc: > > Sent: Thursday, 1 August 2013, 17:15 > > Subject: Re: [proxy] and impl > > > > hehe, do you have figures? > > > > when JIT did its work reflection is almost free. You can update the asm > > proxy factory to handle 3 implementations but it is not worth it IMO > > > > *Romain Manni-Bucau* > > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>* > > *Blog: > > **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/> > > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* > > *Github: https://github.com/rmannibucau* > > > > > > > > 2013/8/1 James Carman <ja...@carmanconsulting.com> > > > >> You're going to lose the benefit of having ASM if you just end up > >> using reflection to call the methods anyway aren't you? The Javassist > >> code actually generates Java code that actually calls the real method > >> on an instance of the appropriate type. That's what makes it faster. > >> > >> On Thu, Aug 1, 2013 at 10:57 AM, Romain Manni-Bucau > >> <rmannibu...@gmail.com> wrote: > >> > No, but believe me you want a handler (this one or invoker) to > > maintain > >> the > >> > code and keep it easy. > >> > > >> > *Romain Manni-Bucau* > >> > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>* > >> > *Blog: **http://rmannibucau.wordpress.com/*< > >> http://rmannibucau.wordpress.com/> > >> > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* > >> > *Github: https://github.com/rmannibucau* > >> > > >> > > >> > > >> > 2013/8/1 Matt Benson <gudnabr...@gmail.com> > >> > > >> >> That's my point; it doesn't. > >> >> > >> >> > >> >> On Thu, Aug 1, 2013 at 9:49 AM, James Carman < > >> ja...@carmanconsulting.com > >> >> >wrote: > >> >> > >> >> > Does the ASM API require a > > java.lang.reflect.InvocationHandler? > >> >> > > >> >> > On Thu, Aug 1, 2013 at 10:41 AM, Romain Manni-Bucau > >> >> > <rmannibu...@gmail.com> wrote: > >> >> > > Well for the maintainance it is easier (and not really > > slower) to > >> use a > >> >> > > little abstraction. InvocationHandler/Inoker is fine. > > Since JdkProxy > >> >> uses > >> >> > > the exact same code i throught it could be shared. > >> >> > > > >> >> > > *Romain Manni-Bucau* > >> >> > > *Twitter: @rmannibucau > > <https://twitter.com/rmannibucau>* > >> >> > > *Blog: **http://rmannibucau.wordpress.com/*< > >> >> > <http://rmannibucau.wordpress.com/>