Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Reflect
-
Labels:None
-
Number of attachments :
Description
Java Reflection is quite slow for the "initialization" part (ie obtaining the reflected Method, Field...) while invocation is quite fast.
It would be nice if FEST-Reflect kept an internal cache of all reflected methods, fields... to optimize reuse of the same method in the same class (for another instance).
Additional API (not sure if it's really worth however) might allow:
- cache clearing
- explicitly stating a method, field, constructor to be cached or not
But so far I don't see a real use case for it (except global cache clearing which could be useful in an application that would, for instance, use FEST-Reflect heavily during initialization but wouldn't need it later on).