jeudi 1 octobre 2015

Performance of frameworks with reflection

In most frameworks (Struts, Spring, Hibernate...) we are specifying the full package names of our class in XML, or annotation. Framework use this information for looking that class, Instantiating it, looking a method it it, and invoking that method.

All these operations use reflection, and this lookup, instantiation, and invoking is a very frequent in a web application. If reflection is a heavy process (needs more CPU, more memory, and more time consuming), Is it worth to use these frameworks for time critical applications?

Is there any optimization techniques that makes Reflection as fast as normal instantiation, and invoking?





Aucun commentaire:

Enregistrer un commentaire