[richfaces-issues] [JBoss JIRA] Created: (RF-10035) Richfaces creates a org.apache.xerces.jaxp.DocumentBuilder instance for each request in ResponseWriterContentHandler.java, which causes bad performance.

Gary Hu (JIRA) jira-events at lists.jboss.org
Thu Dec 16 11:54:18 EST 2010


Richfaces creates a org.apache.xerces.jaxp.DocumentBuilder instance for each request in ResponseWriterContentHandler.java, which causes bad performance.
--------------------------------------------------------------------------------------------------------------------------------------------------------

                 Key: RF-10035
                 URL: https://issues.jboss.org/browse/RF-10035
             Project: RichFaces
          Issue Type: Bug
      Security Level: Public (Everyone can see)
            Reporter: Gary Hu


The thread dump shows that the Richfaces creates a org.apache.xerces.jaxp.DocumentBuilder instance for each request.

#
"ajp-10.176.196.243-48009-166" daemon prio=3 tid=0x0000000104c2cc00 nid=0x739 waiting for monitor entry [0xfffffffe2d0f6000..0xfffffffe2d0ff540]
#
   java.lang.Thread.State: BLOCKED (on object monitor)
#
 at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
#
 - waiting to lock <0xfffffffe700000e0> (a sun.misc.Launcher$AppClassLoader)
#
 at java.lang.ClassLoader.loadClass(Unknown Source)
#
 at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1299)
#
 at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1229)
#
 at org.apache.xerces.impl.dv.ObjectFactory.findProviderClass(Unknown Source)
#
 at org.apache.xerces.impl.dv.ObjectFactory.newInstance(Unknown Source)
#
 at org.apache.xerces.impl.dv.DTDDVFactory.getInstance(Unknown Source)
#
 at org.apache.xerces.impl.dv.DTDDVFactory.getInstance(Unknown Source)
#
 at org.apache.xerces.parsers.XML11Configuration.<init>(Unknown Source)
#
 at org.apache.xerces.parsers.XIncludeAwareParserConfiguration.<init>(Unknown Source)
#
 at org.apache.xerces.parsers.XIncludeAwareParserConfiguration.<init>(Unknown Source)
#
 at sun.reflect.GeneratedConstructorAccessor5.newInstance(Unknown Source)
#
 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
#
 at java.lang.reflect.Constructor.newInstance(Unknown Source)
#
 at java.lang.Class.newInstance0(Unknown Source)
#
 at java.lang.Class.newInstance(Unknown Source)
#
 at org.apache.xerces.parsers.ObjectFactory.newInstance(Unknown Source)
#
 at org.apache.xerces.parsers.ObjectFactory.createObject(Unknown Source)
#
 at org.apache.xerces.parsers.ObjectFactory.createObject(Unknown Source)
#
 at org.apache.xerces.parsers.DOMParser.<init>(Unknown Source)
#
 at org.apache.xerces.parsers.DOMParser.<init>(Unknown Source)
#
 at org.apache.xerces.jaxp.DocumentBuilderImpl.<init>(Unknown Source)
#
 at org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(Unknown Source)
#
 at org.ajax4jsf.context.ResponseWriterContentHandler.<init>(ResponseWriterContentHandler.java:48)
#
 at org.ajax4jsf.context.ViewResources$HeadResponseWriter.<init>(ViewResources.java:259)

The creation of the org.apache.xerces.jaxp.DocumentBuilder instance is very expensive. We should reuse the org.apache.xerces.jaxp.DocumentBuilder instance and call the DocumentBuilder's reset() method to initialize it.


-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the richfaces-issues mailing list