Would you rather have that 5ns, or the ace-in-the-hole where you can
debug your app in an installed production environment by turning on
(assuming you don't use the final static boolean method) the appropriate
logger?  This has been extremely helpful in debugging.  It also catches
lots of things you wouldn't ordinarily see, like when you add this to an
ActionListener more then once and you see your actionPerformed() get
called more then once.  It's also useful for profiling.

The biggest savings with if (logger.isDebugEnabled()) { } comes when the
logger generates lots of StringBuffer objects, costing memory and
garbage collection, which will significantly impact performance more
then the if () to check whether to do it or not.

Tim Lucia

> -----Original Message-----
> From: Kirk Wylie [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, December 09, 2003 7:20 PM
> To: Struts Users Mailing List
> Subject: Re: [OT] Log4J and Pre-Processor
>
> [snip]
> But do you really care that much about 5ns? Are you SURE you 
> care that 
> much about 5ns?
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to