It's the other way around
If (log.isdebugenabled()) is a lot faster then creating another stack frame
for the function, passing in the arguments, etc.

Besides with branch predictors its there is virtually no performance loss.

-Igor
 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Gili
> Sent: Tuesday, August 23, 2005 9:11 PM
> To: [EMAIL PROTECTED]
> Subject: [Wicket-user] Log4j question
> 
> 
>       I'm not familiar with log4j so please enlighten me, why do we do
> Log.isDebugEnabled() before Log.debug() in the Wicket code? 
> If you log a debug message and debug logging isn't enabled 
> nothing will happen anyway. Isn't checking a waste?
> 
> Gili
> --
> http://www.desktopbeautifier.com/
> 
> 
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development 
> Lifecycle Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * 
> Testing & QA
> Security * Process Improvement & Measurement * 
> http://www.sqe.com/bsce5sf
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
> 
> 




-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to