On Wednesday, December 18, 2002, at 12:44 AM, Matt Smith wrote:
Robert -that'd make sense. i used the tomcat web.xml when i did the profiling.
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.
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
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
