On Thu, 22 Apr 2004, Robert Pepersack wrote:

| I've never tried calling isDebugEnabled() again and again in the same
| class.  I'm new to log4j, so I don't have a lot of code that uses
| log4j.  It doesn't cost me anything to factor out the tests from the
| beginning.  Every little bit of performance tuning (no matter how
| insignificant) helps when I have hundreds of threads executing
| simultaneously in my J2EE server.

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]

Reply via email to