I do agree with you that if you are testing a single real-world use
case, the performance difference would be hard to measure, but when a
put a bunch a use cases together, as it might happen in certain
situations, it becomes noticeable.

>From my tests I have found that CgLib is a very good compromise - it
is much faster and flexible (you can provide different types of
callbacks depending on the situation) than JDK proxies and much
simpler than Javassist.

-Harish

On 5/23/05, Achim Huegen <[EMAIL PROTECTED]> wrote:
> I personally don't think, that the performance differences can be
> described as some constant factors. It heavily depends on your environment.
> Maybe a raw call of a interceptor and service if both do nothing may
> vary by a factor of even some hundred percents.
> But as soon as your service and interceptor perform some reasonable
> business logic, the infrastructure overhead won't be noticeable.
> 
> The main difference between JDK proxies and JavaAssist seems to be
> the use of reflection in the first case. I once made some tests
> comparing the performance of direct calls with that of reflection calls
> and wasn't even able to measure any significant difference in a real
> world scenario.
> 
> A hot spot vm is doing a lot of optimization here.
> But look here for some other numbers:
> http://www-106.ibm.com/developerworks/java/library/j-dyn0603/
> 
> Achim Huegen
> 
> 
> Michael Mattox wrote:
> > Greetings,
> >
> > I'm interested in using HiveMind for dependency injection and I'm very
> > interested in using the interceptors.  I've been researching the
> > performance aspects and so far what I've seen has been pretty vague.  I've
> > read that with JDK 1.5 the JDK dynamic proxy performance is about 1.5
> > times slower.  That's a big hit for my application if I'm using these
> > interceptors for all calls to all my services.  I then read that CGLIB has
> > a drop-in replacement for the JDK dynamic proxies but I cannot find any
> > performance measurements, especially for JDK 1.5.  Finally I read in the
> > HiveMind documentation that JavAssist gives a "slight" perf advantage but
> > in several instances it was stated that it greatly increases the
> > development complexity.  I'm curious what the performance increase is
> > exactly.  If Javassist is only 1.4 times slower, then I think it's not
> > worth it.  1.1 times and it may be worth it.  I'm hoping to get some
> > feedback on this because creating a little prototype will take some time
> > although I'm starting to think it may be worth it.
> >
> > Thanks
> > Michael
> >
> >
> >
> > --
> > This E-mail is confidential.  It may also be legally privileged.  If you are
> > not the addressee you may not copy, forward, disclose or use any part of it.
> > If you have received this message in error, please delete it and all copies
> > from your system and notify the sender immediately by return E-mail.
> > Internet communications cannot be guaranteed to be timely, secure, error or
> > virus-free.  The sender does not accept liability for any errors or 
> > omissions.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to