Originally posted by Scott Selikoff:
I don't know the precise tradeoffs, so I can't answer your question directly. But, have you thought about adding interfaces to a lot of your classes? I know in lot of situations where I've considered using reflection, I've instead set up a public interface and worked off that.
Originally posted by Ilja Preuss:
The cost of reflection is known to be very low in modern JVMs. It's unlikely to be the bottleneck when you compare it to the costs of transmitting information via http or accessing a database...
Originally posted by Paul Clapham:
I have never found reflection-using code to be "convenient". It's quite hard to understand and get right, in my opinion. So this equivalent non-reflection code would have to be quite ugly for reflection to beat it out. That's from the code-writing and code-maintaining point of view. I can't comment on the performance question, knowing nothing about the actual code.
And when was the last time anyone actually got a defined non-functional requirement of "this application must manage X transactions per whatever" or "this application must respond subsecond for X concurrent users"?
Can an argument be made that the zreo reflection system would perform better (again, given well written code) than an app the relied heavily on reflection?