Co-author of SCMAD Exam Guide, Author of JMADPlus
SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
Co-author of <a href="http://www.amazon.com/exec/obidos/ASIN/1932394184/ref=jranch-20" target="_blank" rel="nofollow">Java Reflection in Action</a>
Originally posted by Nate Forman:
Chapter 9 also presents a methodology for how to evaluate your results using Amdahl's law.
Co-author of SCMAD Exam Guide, Author of JMADPlus
SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
Co-author of <a href="http://www.amazon.com/exec/obidos/ASIN/1932394184/ref=jranch-20" target="_blank" rel="nofollow">Java Reflection in Action</a>
Originally posted by Ali Pope:
afaik the performance issue of java reflection was very attentive addressed and very improved starting with jdk 1.4
[the_mindstorm]
[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
Originally posted by Nate Forman:
So--you identified object creation as an issue. You want to instantiate some objects reflectively. The first thing to do is figure out how much slower the reflective version is from the static version. The next step is to figure out how much of your total work comprises constructing those specific objects. Plug those figures into Amdahl's law and you get the total slowdown for your system. If this slowdown is acceptable, put in the reflection.
I've found that understanding these concepts is helpful even if you don't do the complete analysis. Sure, we'd all like our apps to be smokin' fast, but you have to trade off other things for that. I'd rather have a "fast enough" app that I can extend and evolve easily...
Co-author of SCMAD Exam Guide, Author of JMADPlus
SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
Originally posted by Ali Pope:
afaik the performance issue of java reflection was very attentive addressed and very improved starting with jdk 1.4
Co-author of SCMAD Exam Guide, Author of JMADPlus
SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
Books: Pragmatic Unit Testing in Java, Agile Java, Modern C++ Programming with TDD, Essential Java Style, Agile in a Flash. Contributor, Clean Code.
Books: Pragmatic Unit Testing in Java, Agile Java, Modern C++ Programming with TDD, Essential Java Style, Agile in a Flash. Contributor, Clean Code.
Originally posted by Ali Pope:
In some places I have even succeeded in obfuscating classes that are used in reflection mode (dirty tricks involving conf files and great ant filter tasks
Co-author of SCMAD Exam Guide, Author of JMADPlus
SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
Co-author of <a href="http://www.amazon.com/exec/obidos/ASIN/1932394184/ref=jranch-20" target="_blank" rel="nofollow">Java Reflection in Action</a>
That's something a good unit test suite would catch with easeOriginally posted by Nate Forman:
Introduce dynamic loading, reflective invocation, etc. to an application, and even if it compiles, it may fail at runtime.
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Co-author of <a href="http://www.amazon.com/exec/obidos/ASIN/1932394184/ref=jranch-20" target="_blank" rel="nofollow">Java Reflection in Action</a>
If you want to look young and thin, hang around old, fat people. Or this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|