On Tue, 1 Aug 2000 15:04:20 -0400, James Cook <[EMAIL PROTECTED]> wrote:
>Reflection is extremely fast for method invocation. To minimize your method
>lookups, store them as you use them in a hashtable.
>
>You should notice no (negligible) performance hit using reflection.
Absolutely. For example, the jBoss EJB container uses reflection to
invoke the methods on the EJB instances, and the performance is very
nice. And as James suggests, we store the methods in a hashtable for
fast access.
So:
1. Method invocation using reflection is fast
2. Method lookup from java.lang.Class is slow
Use intelligently and it is ok.
/Rickard
--
Rickard �berg
Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".