You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Gregory M. Messner" <gm...@titan.com> on 2002/09/07 03:11:27 UTC

[PATCH][Digester] Performance Improvements

Thanks for the quick response. I've attached the patches for the 5 
classes. One of the patches is for 
org.apache.commons.beanutils.MethodUtils which changed the visibility of 
the getMatchingAccessibleMethod(), for some reason it was private when 
all the other getAccessibleMethod() signatures were public. This is 
needed to make the changes in the Rule classes work.

BTW, I'm exploring using the existing digester rules (at least the XML 
based rules) to provide round-tripping, other than Betwixt has anyone 
done any work along these lines?

Greg


Scott Sanders wrote:

>Looking forward to the patch :)
>
>
>
>http://jakarta.apache.org/site/bugs.html
>
>Basically, a cvs diff -u as an attatchment sent to this mailing list
>with a subject starting with [PATCH].
>
>Scott
>
>>-----Original Message-----
>>From: Gregory M. Messner [mailto:gmessner@titan.com] 
>>Sent: Friday, September 06, 2002 5:06 PM
>>To: Jakarta Commons Developers List
>>Subject: [Digester] Performance Improvements
>>
>>
>>First off, I think the digester package is great, however it is a bit 
>>slow, poking around I noticed that each time a method was invoked by 
>>CallMethodRule, SetNextRule, SetRootRule, and  SetTopRule the 
>>java.lang.reflect.Method was looked up each time. I made a 
>>small change in each of these classes that uses 
>>MethodUtils.getAccessibleMethod() or 
>>MethodUtils.getMatchingAccessibleMethod() (depending on the 
>>useExactMatch flag) to get the java.lang.reflect.Method instance, saves 
>>it and then directly calls invoke() on the Method instance.  On a 
>>SunBlade 100 this small change resulted in a 10X speed improvement.
>>
>>I have created patch files for the changes but wasn't sure how to 
>>deliver them, should they all be put in the body of a single 
>>email, each one sent in its own email, or should they be attached to an 
>>email?  As soon as someone lets me know the correct way to submit the 
>>patches I'll send them in.
>>
>>Greg
>>