[jboss-dev-forums] [Design the new POJO MicroContainer] - ComponentMetaDataRetrieval - performance
adrian@jboss.org
do-not-reply at jboss.com
Wed Jul 23 10:42:16 EDT 2008
So I've been fnally got around to looking at some performance bottlenecks.
I've started with the component metadata retrieval problem
mentioned by Ales on a different thread.
The issue here appears to be a lot of calls of type Class.getMethod() and
Method.getParameterTypes() even though for the first, the Method
is already known when you construct the Signature and for the second
it isn't always necessary to know the exact parameters.
The same is true for Constructors and Fields.
As a performance improvement, I'm going to introduce some caching
of the Member object to reduce this work
and make the retrieval of parameter(types) lazy.
One downside of this optimization is that it will no longer check whether
the method really exists on the class if you pass in the method.
i.e. instead of getting back a null you will
get back some empty metadata if you are stupid in the parameters you pass. :-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4166173#4166173
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4166173
More information about the jboss-dev-forums
mailing list