Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 22982 invoked from network); 16 Feb 2011 15:20:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 16 Feb 2011 15:20:23 -0000 Received: (qmail 30335 invoked by uid 500); 16 Feb 2011 15:20:23 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 28503 invoked by uid 500); 16 Feb 2011 15:20:19 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 28484 invoked by uid 99); 16 Feb 2011 15:20:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Feb 2011 15:20:18 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Feb 2011 15:20:17 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id A059B1A8EE3 for ; Wed, 16 Feb 2011 15:19:57 +0000 (UTC) Date: Wed, 16 Feb 2011 15:19:57 +0000 (UTC) From: "Stepan Koltsov (JIRA)" To: dev@jackrabbit.apache.org Message-ID: <1656561059.20790.1297869597653.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] Created: (JCR-2896) WebdavResponseImpl should cache TransformerFactory MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 WebdavResponseImpl should cache TransformerFactory -------------------------------------------------- Key: JCR-2896 URL: https://issues.apache.org/jira/browse/JCR-2896 Project: Jackrabbit Content Repository Issue Type: Bug Components: jackrabbit-webdav Affects Versions: 2.2.2 Reporter: Stepan Koltsov JackrabbitResponeImpl.sendXmlResponse creates an instance of TransformerFactory on each invocation. We see, that this TransformerFactory initialization consumes significant amount of time, because of complex logic inside: {code} at java.lang.String.intern(Native Method) at java.util.jar.Attributes$Name.(Attributes.java:449) at java.util.jar.Attributes.putValue(Attributes.java:151) at java.util.jar.Attributes.read(Attributes.java:404) at java.util.jar.Manifest.read(Manifest.java:234) at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:188) at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:176) at java.util.jar.JarVerifier.processEntry(JarVerifier.java:277) at java.util.jar.JarVerifier.update(JarVerifier.java:188) at java.util.jar.JarFile.initializeVerifier(JarFile.java:321) at java.util.jar.JarFile.getInputStream(JarFile.java:386) at sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:144) at java.net.URL.openStream(URL.java:1009) at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:1170) at javax.xml.transform.SecuritySupport$4.run(SecuritySupport.java:94) at java.security.AccessController.doPrivileged(Native Method) at javax.xml.transform.SecuritySupport.getResourceAsStream(SecuritySupport.java:87) at javax.xml.transform.FactoryFinder.findJarServiceProvider(FactoryFinder.java:250) at javax.xml.transform.FactoryFinder.find(FactoryFinder.java:223) at javax.xml.transform.TransformerFactory.newInstance(TransformerFactory.java:102) at org.apache.jackrabbit.webdav.WebdavResponseImpl.sendXmlResponse(WebdavResponseImpl.java:163) {code} TransformerFactory can be cached in static field: private static final TransofmerFactory transformerFactory = TransformerFactory.newInstance(). -- This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira