This content has been marked as final. Show 2 replies
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. :-)