Bug 779373 - (SOA-1763) Improvement in the code for XsltAction.java approximatly 20% better throughput with this one change
Improvement in the code for XsltAction.java approximatly 20% better throughpu...
Status: CLOSED NEXTRELEASE
Product: JBoss Enterprise SOA Platform 5
Classification: JBoss
Component: JBossESB, Performance (Show other bugs)
5.0.0 ER5
Unspecified Unspecified
high Severity high
: ---
: 5.0.0 GA,5.0.0 ER7
Assigned To: Kevin Conner
http://jira.jboss.org/jira/browse/SOA...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-01-03 21:01 EST by Jim Tyrrell
Modified: 2010-01-28 06:06 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Linux JDK 6 with SOA-P 5.0 Beta 1
Last Closed: 2010-01-28 06:06:44 EST
Type: Feature Request
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
TestXsltAction.java (16.17 KB, text/plain)
2010-01-03 21:02 EST, Jim Tyrrell
no flags Details
jboss-esb.xml (1.43 KB, text/xml)
2010-01-04 11:34 EST, Jim Tyrrell
no flags Details
MyTransform.xslt (923 bytes, application/xml)
2010-01-04 11:34 EST, Jim Tyrrell
no flags Details
PerformanceTesting-soapui-project.xml (624.57 KB, text/xml)
2010-01-04 11:38 EST, Jim Tyrrell
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker SOA-1763 None None None Never

  None (edit)
Description Jim Tyrrell 2010-01-03 21:01:50 EST
Date of First Response: 2010-01-03 21:40:15
project_key: SOA

With this change:

adding this member variable:
    private Transformer transformer = null;

Commenting out/removing this line:
         //   final Transformer transformer = xslTemplate.newTransformer();

and moving it to the initialize method as:
//Line for point of reference in the method.
       xslTemplate = createTemplate(transformerConfig.getTemplateFile(), factory);

//New line added in
            transformer = xslTemplate.newTransformer();
Comment 1 Jim Tyrrell 2010-01-03 21:02:50 EST
Entire source file if you wish to compare it.
Comment 2 Jim Tyrrell 2010-01-03 21:02:50 EST
Attachment: Added: TestXsltAction.java
Comment 3 Daniel Bevenius 2010-01-03 21:40:15 EST
Hi Jim, 

It was intentional to not have the creation of the transformer in the initialize method and instead have it in the process methods because, as far as I am aware, a Transformer instance is not thread safe and depending on the setting of maxThreads setting this could lead to problems.

Regards,

/Daniel
Comment 4 Kevin Conner 2010-01-04 05:08:21 EST
Daniel is spot on, Transformer is not thread safe.
Comment 5 Jim Tyrrell 2010-01-04 09:47:59 EST
Okay I stand corrected, but can this be written to create a "transformer" pool so that each thread running can get their own instance.  This would be a big improvement "approximately 20%" or so in my testing performance?

I assume in a http_gateway multiple threads are running, is that true, how can that be confirmed?

In my testing I saw no errors, so at least with my configuration is it possible this is only single threaded?
Comment 6 Jim Tyrrell 2010-01-04 11:34:25 EST
Comment in either xslttransformation as needed
Comment 7 Jim Tyrrell 2010-01-04 11:34:25 EST
Attachment: Added: jboss-esb.xml
Comment 8 Jim Tyrrell 2010-01-04 11:34:47 EST
Transform XSLT file
Comment 9 Jim Tyrrell 2010-01-04 11:34:47 EST
Attachment: Added: MyTransform.xslt
Comment 10 Jim Tyrrell 2010-01-04 11:38:05 EST
Attachment: Added: PerformanceTesting-soapui-project.xml
Comment 11 Jim Tyrrell 2010-01-04 11:39:40 EST
The SOAP UI attached project can drive thoughput, I usually run the 10k test called 10k Average Load and I have to set the end point with the 10k Throughput Request both under the 10k Average Payload Size
Comment 12 Kevin Conner 2010-01-05 07:12:21 EST
Link: Added: This issue depends JBESB-3098
Comment 13 Martin Vecera 2010-01-28 05:35:01 EST
The fix won't work in some cases. JBR gateway is an example, since the configuration parameter has a different name:

<jbr-listener name="Socket-Gateway" busidref="Socket-1" is-gateway="true">
<property name="jbr-maxThreads" value="4" />
</jbr-listener>
Comment 14 Kevin Conner 2010-01-28 05:42:36 EST
Sorry, what does the gateway have to do with this?
Comment 15 Martin Vecera 2010-01-28 06:06:44 EST
I found out that this is a different attribute. Thanks to Kevin.

Verified in ER7.

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