The issue I was raising was just to be aware of the potential cost of assembling the parameters for the debug() call, particularly because you will bear that cost even if debug logging is disabled (that is, if you don't wrap the debug() call in the conditional).
Also, Endre, I found the Shirazi book for which you provided the link to be disappointing and not very useful. I would agree it's very thorough, but in my opinion he puts way too much emphasis on micro-optimizations that (in my experience) don't usually have enough payoff in any reasonably-sized system. (Note that I have the first edition; not sure how much it was updated for the second.)
FWIW, I personally preferred Larman & Guthrie's Java 2 Performance and Idiom Guide:
http://www.amazon.com/exec/obidos/ASIN/0596003773/ref=pd_ecc_rvi_1/002-2868363-4836035
dwh
Endre St�lsvik wrote:
This isn't true. You should do performance profiling (e.g. using stack-sampling or any other method that fits your need) to check where the bottlenecks really are - and concentrate on the top two or three methods - and then iterate till you're happy. The log-check-statements won't EVER be a hogger!!!
There are some really nice books on performance optimization - read them. This one was a -real- eye-opener for me:
http://www.amazon.com/gp/reader/0596003773/ref=sib_dp_pt/103-9972591-5184657
It's just so through that you get to know tons of things about the java language and the JVM and everything that you didn't know before!!
Endre.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
