commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robert burrell donkin <>
Subject Re: [BeanUtils] MethodUtils caching
Date Thu, 19 Dec 2002 19:24:12 GMT

On Wednesday, December 18, 2002, at 12:44 AM, Matt Smith wrote:

> Robert -
> This statement confused me at first, because the first thing I tried was
> updating from BeanUtils1.3 to BeanUtils1.5. I did not find any difference 
> in
> the performance characteristics. Both contain a call to Class.getMethods(
> ),
> which my profiler indicated was where most of the work was being done.
> However, I'm currently running under JDK1.3. I looked at the source for
> JDK1.4, and Class does indeed now cache a bunch of calls, including
> getMethods(). Updating to JDK1.4 had a significant impact on the 
> performance
> characteristics for this particular call.
> As usually works out, however, doing no work at all is faster than doing
> some work. I found that my personal implementation of caching the result 
> of
> of getAccessibleMethod() improved things further still. On the particular
> data set I'm running on, the normalized times were:
> JDK1.3: 1.0
> JDK 1.4: 0.85
> Cached: 0.66
> It's possible that for most people it doesn't make a difference, however.
>  My
> data is "perversely leafy", which makes it call these digester rules many
> times.

that'd make sense. i used the tomcat web.xml when i did the profiling.

caching has some wrinkles (like classloaders) plus MethodUtils has been in 
an unofficial code freeze. i'm very keen to work on caching but i think 
that it must wait until after the next (bugfix) release. (hopefully that 
will be very soon now.)

- robert

View raw message