Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1065128 - [GSS] (6.4.z) Performance issue with Xalan transformer and very large text nodes
[GSS] (6.4.z) Performance issue with Xalan transformer and very large text nodes
Status: CLOSED CURRENTRELEASE
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: XML Frameworks (Show other bugs)
6.2.1
Unspecified Unspecified
unspecified Severity medium
: CR1
: EAP 6.4.2
Assigned To: Kyle Lape
Rostislav Svoboda
:
Depends On:
Blocks: 1175982 1181337 1219165
  Show dependency treegraph
 
Reported: 2014-02-13 20:17 EST by Kyle Lape
Modified: 2017-01-17 05:16 EST (History)
13 users (show)

See Also:
Fixed In Version:
Doc Type: Known Issue
Doc Text:
A bug has been found in this release of JBoss EAP 6 that causes performance issues when attempting to convert large text nodes using the Xalan Transformer. When using the Transfomer to convert a StreamSource to DOMResult, the performance of the Transformer decreases as the size of the character data increases. This is a Known Issue and will be corrected in a later release of the product.
Story Points: ---
Clone Of:
: 1181337 (view as bug list)
Environment:
Last Closed: 2017-01-17 05:15:12 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker WFLY-2900 Blocker Closed Performance issue with Xalan transformer and very large text nodes 2018-09-24 19:26 EDT

  None (edit)
Description Kyle Lape 2014-02-13 20:17:27 EST
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.


Code to reproduce:

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);
Comment 2 Scott Mumford 2014-04-22 18:40:21 EDT
Flagged as Known Issue as ticket unresolved at the time of writing the release note.
Comment 5 Rostislav Svoboda 2014-07-17 07:45:13 EDT
Verification failed on EAP 6.3.0 ER10 - xalan-2.7.1.redhat-7.jar

xalan-2.7.1.redhat-7.jar has the same poor performance as xalan-2.7.1.redhat-3.jar from EAP 6.2.0 GA

I checked xalan jar file from https://issues.jboss.org/browse/JBPAPP-10994 and its performance in transformation is astonishing.

xalan-2.7.1.redhat-7.jar and xalan-2.7.1.redhat-3.jar
  (total time: 4 minutes 14 seconds)

JBPAPP-10994/xalan.jar
  (total time: 2 seconds)


I decompiled xalan-2.7.1.redhat-7.jar and commit https://github.com/jboss/xalan-j/pull/2/files is NOT present.
Comment 6 Jason T. Greene 2014-07-28 15:43:19 EDT
That PR was never put into wildfly due to the likely regression: 
https://bugzilla.redhat.com/show_bug.cgi?id=1090544

The issue was closed after not being able to reproduce which I suspect is because as mentioned here 7 did not include the patch.

I have reverted the change to the xalan fork we have for now.
https://github.com/jboss/xalan-j/pull/3
Comment 7 Jason T. Greene 2014-07-28 15:52:38 EDT
I forgot to add, that I do not know why -7 did not include the patch
Comment 23 Rostislav Svoboda 2015-04-23 10:28:38 EDT
Re-acking after "qa_ack flag reset for and jboss-eap-6.4.0 and jboss-eap-6.4.z items" cleanup.
Comment 25 Rostislav Svoboda 2015-06-24 06:06:20 EDT
Verified on EAP 6.4.2 CR1

EAP 6.4.0 GA  - total time: 2 minutes 44 seconds
EAP 6.4.2 CR1 - total time: 1 second
Comment 26 Petr Penicka 2017-01-17 05:15:12 EST
Retroactively bulk-closing issues from released EAP 6.4 cumulative patches.
Comment 27 Petr Penicka 2017-01-17 05:16:02 EST
Retroactively bulk-closing issues from released EAP 6.4 cumulative patches.

Note You need to log in before you can comment on or make changes to this bug.