Bug 1065128 - [GSS] (6.4.z) Performance issue with Xalan transformer and very large text nodes
Summary: [GSS] (6.4.z) Performance issue with Xalan transformer and very large text nodes
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: XML Frameworks
Version: 6.2.1
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: CR1
: EAP 6.4.2
Assignee: Kyle Lape
QA Contact: Rostislav Svoboda
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: 1175982 1181337 1219165
TreeView+ depends on / blocked
 
Reported: 2014-02-14 01:17 UTC by Kyle Lape
Modified: 2019-04-16 14:08 UTC (History)
13 users (show)

(edit)
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.
Clone Of:
: 1181337 (view as bug list)
(edit)
Last Closed: 2017-01-17 10:15:12 UTC


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 23:26 UTC

Description Kyle Lape 2014-02-14 01:17:27 UTC
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 22:40:21 UTC
Flagged as Known Issue as ticket unresolved at the time of writing the release note.

Comment 5 Rostislav Svoboda 2014-07-17 11:45:13 UTC
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 19:43:19 UTC
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 19:52:38 UTC
I forgot to add, that I do not know why -7 did not include the patch

Comment 23 Rostislav Svoboda 2015-04-23 14:28:38 UTC
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 10:06:20 UTC
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 10:15:12 UTC
Retroactively bulk-closing issues from released EAP 6.4 cumulative patches.

Comment 27 Petr Penicka 2017-01-17 10:16:02 UTC
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.