[jboss-jira] [JBoss JIRA] (WFLY-2900) Performance issue with Xalan transformer and very large character data nodes

Kyle Lape (JIRA) issues at jboss.org
Tue Feb 11 00:43:28 EST 2014


     [ https://issues.jboss.org/browse/WFLY-2900?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kyle Lape updated WFLY-2900:
----------------------------

    Description: 
It has been observed that when using the {{Transfomer}} to convert a {{StreamSource}} to {{DOMResult}}, the performance of Transform gets worse as the size of the
character data increases.  If you have a 50MB text blob in XML, this will take a very long time to finish.

  was:
It has been observed that when using the {{Transfomer}} to convert a {{StreamSource}} to {{DOMResult}}, the performance of Transform gets worse as the size of the
inputstream increases.

Code to reproduce:

{code:java}
import java.io.ByteArrayInputStream;

import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.dom.DOMResult; 
import javax.xml.transform.stream.StreamSource;

  StringBuilder sb = new StringBuilder();
  sb.append("<thing>");
  while(sb.length() < 50*1024*1024) { //50MB
    sb.append("iunfgq0irg02i4t985023gwhj9eroisghvpoweisvdj”);  //random blob
  }
  sb.append("</thing>");
  TransformerFactory   tFactory    = TransformerFactory.newInstance();
  Transformer          transformer = tFactory.newTransformer();
  ByteArrayInputStream bais        = new ByteArrayInputStream(sb.toString().getBytes());
  StreamSource         source      = new StreamSource(bais);
  DOMResult            result      = new DOMResult();

  transformer.transform(source, result);
{code}


    
> Performance issue with Xalan transformer and very large character data nodes
> ----------------------------------------------------------------------------
>
>                 Key: WFLY-2900
>                 URL: https://issues.jboss.org/browse/WFLY-2900
>             Project: WildFly
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: XML Frameworks
>            Reporter: Kyle Lape
>            Assignee: Jason Greene
>
> It has been observed that when using the {{Transfomer}} to convert a {{StreamSource}} to {{DOMResult}}, the performance of Transform gets worse as the size of the
> character data increases.  If you have a 50MB text blob in XML, this will take a very long time to finish.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the jboss-jira mailing list