Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 73882 invoked by uid 500); 7 Aug 2001 10:35:05 -0000 Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-dev@xml.apache.org Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 73797 invoked from network); 7 Aug 2001 10:35:04 -0000 From: "Carsten Ziegeler" To: "Cocoon-Dev@Xml. Apache. Org" Subject: [C2]: Performance and logging Date: Tue, 7 Aug 2001 12:35:42 +0200 Message-ID: MIME-Version: 1.0 X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Importance: Normal X-MIMETrack: Itemize by SMTP Server on PBSN1/Systeme und Netzwerke(Release 5.0.5 |September 22, 2000) at 07.08.2001 12:35:03, Serialize by Router on PBSN1/Systeme und Netzwerke(Release 5.0.5 |September 22, 2000) at 07.08.2001 12:35:03, Serialize complete at 07.08.2001 12:35:03 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N Hi, I know that we had this discussion some time ago, with no real solution, so I thought: why not start it again? Looking at the way logging is performed in cocoon 2, I think this is not very fast. Here an example: getLogger().debug("Creating new Templates in " + this + " for " + this.inputSource.getSystemId()); Even if the priority debug is disabled, the method getLogger() (from AbstractLoggable) is called returning the logger, the expensive string concatenation is performed and the debug() method of the logger is called. And these steps are done for every debug message! We should change two things here: a) Replace the getLogger() call with the use of an instance variable logger. This requires to make an own AbstractLoggable class which offers the logger as an instance variable and not via a method. b) Before logging testing the priority. So the example above should read: if (this.logger.isDebugEnabled() == true) { this.logger.debug("Creating new Templates in " + this + " for " + this.inputSource.getSystemId()); } Comments? Ideas? Suggestions? Volunteers? Carsten Open Source Group sunShine - b:Integrated ================================================================ Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn www.sundn.de mailto: cziegeler@sundn.de ================================================================ --------------------------------------------------------------------- To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org For additional commands, email: cocoon-dev-help@xml.apache.org