John C. Dale wrote:
I'm concerned about your mention of reflection. I really like
reflection, and think it has many useful applications in the
application development space, but should be kept out of any runtime
application that has stringent scalability and performance requirements.
it should be kept out of *any* code that has stringent performance
requirements.
Indeed! One should know when to use the right tool.
But in all applications I have ever developed using containers that use
reflection
operations, (usually to do instantiation and facilitate late binding),
those operations
have never turned out to be the bottleneck.
99% of time is spent doing I/O, waiting for locks, or doing actual
processing.
If the development time gained by using some ingenious proxying or
reflection
code you write once and use in the right place, is spent optimizing the
bottleneck
code, your app becomes lighting fast.
The trick is to write most of your application so that it does not care
whether
it is subject to reflection of any kind at any point. If it turns out
that's your
bottleneck, you can always take it out and replace it with something
efficient.
Here are some dramatic results:
ehm. Why are they dramatic? Reflection is known to be slow, yes, but
I've yet
to see hard figures showing it being the bottleneck in any realistic system.
cheers!
- Leo
- Re: Reflection Bad, OO and direct Method invocation G... John C. Dale
- Re: Reflection Bad, OO and direct Method invocation G... Test Account
- Re: Reflection Bad, OO and direct Method invocation G... John C. Dale
- Re: Reflection Bad, OO and direct Method invocation G... Robert McIntosh
- Re: Reflection Bad, OO and direct Method invocation G... Greg Wilkins
- Re: Reflection Bad, OO and direct Method invocation G... Test Account
- Re: Reflection Bad, OO and direct Method invocation G... Greg Wilkins
- [aspects] Re: Reflection Bad, OO and direct Method in... Jules Gosnell
- Re: [aspects] Re: Reflection Bad, OO and direct Metho... James Strachan
- Re: Reflection Bad, OO and direct Method invocation G... Dain Sundstrom
- Re: Reflection Bad, OO and direct Method invocation G... Leo Simons
- Re: Reflection Bad, OO and direct Method invocation G... John C. Dale
- Re: Reflection Bad, OO and direct Method invocation G... Leo Simons
- RE: Reflection Bad, OO and direct Method invocation G... Howard M. Lewis Ship
- Re: Reflection Bad, OO and direct Method invocation G... Alex Blewitt
- Re: JMX as a kernel (was: Re: geronimo and avalon?) Hiram Chirino
- Re: JMX as a kernel (was: Re: geronimo and avalon?) Paul Hammant
- Re: JMX as a kernel (was: Re: geronimo and avalon?) Jason Dillon
- RE: JMX as a kernel (was: Re: geronimo and avalon?) Noel J. Bergman
- RE: JMX as a kernel (was: Re: geronimo and avalon?) Gareth Bryan
- Re: JMX as a kernel (was: Re: geronimo and avalon?) Weston M. Price