On Fri, 29 Mar 2002 12:38, Ceki Gülcü wrote: > 1) logging calls are made thousands of times so the indirection through > an equalizer API (like commons-logging) has a performance impact
Not in modern JVMs (read most almost all jdk1.3 impls). As long as the underlying indirection (ie between commons and Log4j) is done via a final variable then the cost is zero due to JVM optimizations. Theres still the cost of the dynamic dispatch between user land code and commons code but that cost is very very minimal compared to the rest of the logging operations. The cost comes in constructing the string objects (which is literally thousands times more expensive than a dynamic dispatch) and routing the log message. As long as the API supports functions like isDebugEnabled() (which I believe commons does? or at least did) then the performance cost is so negligable to be unimportant. -- Cheers, Pete ----------------------------------------------------------- If your life passes before your eyes when you die, does that include the part where your life passes before your eyes? ----------------------------------------------------------- -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>