tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: svn commit: r531306 - in /tomcat: container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ container/tc5.5.x/catalina/src/share/org/apache/catalina/session/ container/tc5.5.x/webapps/docs/ jasper/tc5.5.x/src/share/org/apache/jasper/runtime/
Date Mon, 23 Apr 2007 01:12:01 GMT
Remy Maucherat wrote:
> markt@apache.org wrote:
>> Fix some logging related memory leaks. This fixes 41272 and the root
> -1. Getting a logger has, AFAIK, a possibly significant cost. Since
> getting a RD is a very common option, this is not acceptable.
I took a look at the commons-logging code. The first call for a
context will be expensive as the logger has to be created. After that
it is:
 - one call to getContextClassLoader() (via reflection)
 - two hashtable look ups
 - some wrapper code
I knew it used getContextClassLoader(). I didn't realise it was via
reflection so I agree with you about the performance hit.

> If you really want to fix this non issue (which will simply happen
> elsewhere in more insidious form),
I don't view memory leaks and loggers for one context logging messages
for a different context a non-issue. Given all it takes for this to
occur is to put log4j in a webapp this is likely to affect a lot of
people - including me ;). I am happy to spend the time fixing these
issues and any others that crop up in the future.

> I think you should find another way (removing a
> lot of the logging would be good, since it's lame debug which should not
> be there, and maybe use wrapper.getLogger).
I like the wrapper.getLogger() idea. I don't have time to look at this
tonight - I'll take a look tomorrow.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message