Return-Path: X-Original-To: apmail-tomcat-dev-archive@www.apache.org Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BB09CB348 for ; Tue, 10 Jan 2012 11:27:36 +0000 (UTC) Received: (qmail 70242 invoked by uid 500); 10 Jan 2012 11:20:38 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 70160 invoked by uid 500); 10 Jan 2012 11:20:15 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 70103 invoked by uid 99); 10 Jan 2012 11:20:07 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jan 2012 11:20:07 +0000 Received: from localhost (HELO [192.168.23.9]) (127.0.0.1) (smtp-auth username markt, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jan 2012 11:20:06 +0000 Message-ID: <4F0C1EDC.8080008@apache.org> Date: Tue, 10 Jan 2012 11:19:56 +0000 From: Mark Thomas User-Agent: Mozilla/5.0 (Windows NT 5.2; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: Tomcat Developers List Subject: Re: More Caching for WebappClassLoader? References: <4F0C166B.3010806@kippdata.de> In-Reply-To: <4F0C166B.3010806@kippdata.de> X-Enigmail-Version: 1.3.4 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit On 10/01/2012 10:43, Rainer Jung wrote: > I wonder whether we want to improve caching in the WebappLoader. Of > course most deployments no longer use shared or common to share many > application classes, but it is still a supported feature and for some > classes like JDBC it is standard. I think at least providing the option to do so would be a good idea. > What we could do to keep the design simple is caching any positive > result from loadClass() in the WebappLoader, even it it was found via > super, system or parent. In addition we could also cache negative > results for all those. The biggest downsides I can see would be > > - less dynamics: if someone had a more dynamic loader unerneath ours, > which would change the result of loadClass() during runtime, we would > shield the app from it, because we now return classes from our cache. > > - increased memory use for the cache, i.e. the list of class names and > references to the classes. > > To stay completely compatible I think the feature should not be default, > at least until TC 7, maybe switch default for 8. > > What do you think? Does it make sense? Should I prepare a patch for trunk? This makes sense for this specific use case. I'd lean towards making this disabled by default since the benefits only kick in for a less used use case but the disadvantages apply in all cases. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org