You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Stepan Koltsov (JIRA)" <ji...@apache.org> on 2011/02/16 16:19:57 UTC

[jira] Created: (JCR-2896) WebdavResponseImpl should cache TransformerFactory

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.<init>(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

        

[jira] Assigned: (JCR-2896) WebdavResponseImpl should cache TransformerFactory

Posted by "angela (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-2896?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

angela reassigned JCR-2896:
---------------------------

    Assignee: angela

> WebdavResponseImpl should cache TransformerFactory
> --------------------------------------------------
>
>                 Key: JCR-2896
>                 URL: https://issues.apache.org/jira/browse/JCR-2896
>             Project: Jackrabbit Content Repository
>          Issue Type: Improvement
>          Components: jackrabbit-webdav
>    Affects Versions: 2.2.2
>            Reporter: Stepan Koltsov
>            Assignee: angela
>
> 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.<init>(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

        

[jira] Updated: (JCR-2896) WebdavResponseImpl should cache TransformerFactory

Posted by "angela (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-2896?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

angela updated JCR-2896:
------------------------

    Issue Type: Improvement  (was: Bug)

> WebdavResponseImpl should cache TransformerFactory
> --------------------------------------------------
>
>                 Key: JCR-2896
>                 URL: https://issues.apache.org/jira/browse/JCR-2896
>             Project: Jackrabbit Content Repository
>          Issue Type: Improvement
>          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.<init>(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

        

[jira] Resolved: (JCR-2896) WebdavResponseImpl should cache TransformerFactory

Posted by "angela (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-2896?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

angela resolved JCR-2896.
-------------------------

       Resolution: Fixed
    Fix Version/s: 2.3.0

same applied to XmlRequestEntity...

> WebdavResponseImpl should cache TransformerFactory
> --------------------------------------------------
>
>                 Key: JCR-2896
>                 URL: https://issues.apache.org/jira/browse/JCR-2896
>             Project: Jackrabbit Content Repository
>          Issue Type: Improvement
>          Components: jackrabbit-webdav
>    Affects Versions: 2.2.2
>            Reporter: Stepan Koltsov
>            Assignee: angela
>             Fix For: 2.3.0
>
>
> 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.<init>(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