geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leo Simons <>
Subject Re: Reflection Bad, OO and direct Method invocation Good...
Date Sat, 09 Aug 2003 14:31:24 GMT
John C. Dale wrote:

> I have no problem with reflection for the instantiation of a policy 
> *once* during the course of an applications' lifecycle.  However, 
> using reflection rampantly for every user request will result in the 
> vaunted and oft feared big Oh catastrophy.  If you have 1 + n 
> reflection operations for every user request, the application 
> performance relative to the reflection code will degrade exponentially 
> with the increase of concurrent users to the system O(n exponential). 

hey, guess what: we agree!

A container is basically there to manage an applications' lifecycle. 
When your
components are up and running, the container should be next to invisible 
(or at
least you should have that option). But startup is already so expensive 
that a
little reflection isn't going to hurt. The same goes for stuff like 
conversion like soap and many other setups.

> If its precise empirical data you're asking for, I would ask the same 
> - 99%?  ;) 

let's settle on the 80/20 rule then :D.

> How does an application 'not care if it is subject to reflection'? 
> Module isolation?  Low coupling? 

dynamic proxying is one way. Really careful interface design is another, 
as is bytecode


- Leo, who wishes he'd learn to just shut up

View raw message