there are two things to consider:
- the time that is spent in arguments of the call.
- the time that is spent in the call
If you have something like
debug("abc")
there is hardly any time spent constructing
the argument. But if you have
debug("abc" + someNestedObject.toString());
or
debug(translate("abc"));
(or something like that)
You pay the time spent in translate() and toString()
even if debug is off. (They are evaluated before
the method is called) Depending on the nature
of the called methods that can be quite some time.
In opposition to Mr. Shapira I wouldn't expect that
log4 spends much time in the call to debug() as I
would expect the 'if (logger.isDebugEnabled)' as
first test inside of debug().
(But that's just an opinion, I have never tried it or
looked at the source)
> -----Original Message-----
> From: Jim Lynch [mailto:[EMAIL PROTECTED]
> Sent: Thursday, December 04, 2003 3:08 PM
> To: Tomcat Users List
> Subject: Re: How to measue performance? Log4j on/off.
>
>
> Hi, Yoav,
>
> I'll take a look at thos products. I wasn't aware of your other
> suggestion. I assume you mean it will improve the performance when
> debugging is turned off thus preventing the debug statement
> from being called at all. Is this because there is a lot of overhead with
> debug(...) calls even with debugging off?
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]