geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dain Sundstrom <>
Subject Re: [Logs] Re: Logging code and Garbage Collection
Date Thu, 14 Aug 2003 22:49:58 GMT
On Thursday, August 14, 2003, at 05:34 PM, James Strachan wrote:

> Just to be clear - if I understand Dain's patch correctly - it 
> optimises isXEnabled() calls by caching the value in an instance 
> variable inside the Log proxy so the JVM can inline it - rather than 
> the slightly expensive internal call to a singleton which uses 
> synchronization in log4j..

I don't think the method I wrote can be inlined as it accesses private 
variables in the log.  We could make the variables public as the worst 
case is someone changes the values and they are out of whack until the 
next update cycle.

> It comes from the discussions of isXEnabled() methods being slow in 
> Axis etc.

I don't know about axis but the isXEnabled calls are expensive and this 
helps to reduce the sheer number of calls.


View raw message