Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 55360 invoked from network); 7 Oct 2003 11:51:37 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 7 Oct 2003 11:51:37 -0000 Received: (qmail 66632 invoked by uid 500); 7 Oct 2003 11:51:14 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 66614 invoked by uid 500); 7 Oct 2003 11:51:13 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 66601 invoked from network); 7 Oct 2003 11:51:13 -0000 Received: from unknown (HELO ttmail.tduk.com) (212.137.63.82) by daedalus.apache.org with SMTP; 7 Oct 2003 11:51:13 -0000 Received: by ttmail.tduk.com (Postfix, from userid 65534) id 29EA83BAE3; Tue, 7 Oct 2003 12:50:31 +0100 (BST) Received: from localhost (localhost [127.0.0.1]) by ttmail.tduk.com (Postfix) with ESMTP id D3DAF3B9AF for ; Tue, 7 Oct 2003 12:50:29 +0100 (BST) Received: from ttmail.tduk.com (localhost [127.0.0.1]) by localhost (VaMailArmor-2.0.1.14) id 13843-05261E09; Tue, 07 Oct 2003 12:50:29 +0100 Received: from pguyatt2 (unknown [212.137.61.210]) by ttmail.tduk.com (Postfix) with ESMTP id B1C913B949 for ; Tue, 7 Oct 2003 12:50:29 +0100 (BST) From: "Peter Guyatt" To: "Tomcat Users List" Subject: RE: Accessing objects with any servlets, where the object is already pre-created Date: Tue, 7 Oct 2003 12:50:47 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal In-Reply-To: <3F82A45D.50806@joedog.org> X-AntiVirus: checked by Vexira MailArmor (version: 2.0.1.14; VAE: 6.21.0.1; VDF: 6.21.0.58; host: ttmail.tduk.com) X-Spam-Status: No, hits=-9.0 required=5.0 tests=AWL,BAYES_30,EMAIL_ATTRIBUTION,IN_REP_TO, MSGID_GOOD_EXCHANGE,ORIGINAL_MESSAGE,QUOTED_EMAIL_TEXT, REPLY_WITH_QUOTES autolearn=ham version=2.55 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi there, I beleive that using the setAttribute adds the object to a hashtable. If when the hashtable reaches a certian limit (usually 75% of its total size) it re-hashs which can be expensive and cause performance problems. The solution is to ensure that the limit is never reached. Is there a way to set the initial limit for the context? Pete -----Original Message----- From: Tim Funk [mailto:funkman@joedog.org] Sent: 07 October 2003 12:33 To: Tomcat Users List Subject: Re: Accessing objects with any servlets, where the object is already pre-created I can't see why there would be a difference. -Tim Vidar Langberget wrote: > Have you noticed any performance problems with storing large amounts of data > in the servlet context? > > I'm developing a cache for my webapp, and I can't decide if I want to use a > static class or store cache instances in the servlet context. > > > Vidar > > ----- Original Message ----- > From: "Tim Funk" > > >>My preference is to store the data into the servlet context (using >>setAttribute). Then no static variables are needed. > --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org