[OCP 21 Professional Study Guide] [OCP 17 Complete Study Guide] [OCP 17 Practice Tests] [OCP 11 Complete Study Guide] [OCP 11 Programmer I] [OCP 11 Programmer II] [OCP 11 Practice Tests] [OCA 8] [OCP 8] [OCP 8 Practice Tests Book] [Blog]
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.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
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.
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
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?
I need a new interior decorator. This tiny ad just painted every room in my house purple.
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|