Bug 779373 (SOA-1763) - Improvement in the code for XsltAction.java approximatly 20% better throughput with this one change
Summary: Improvement in the code for XsltAction.java approximatly 20% better throughpu...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: SOA-1763
Product: JBoss Enterprise SOA Platform 5
Classification: JBoss
Component: JBossESB, Performance
Version: 5.0.0 ER5
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 5.0.0 GA,5.0.0 ER7
Assignee: Kevin Conner
QA Contact:
URL: http://jira.jboss.org/jira/browse/SOA...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-01-04 02:01 UTC by Jim Tyrrell
Modified: 2010-01-28 11:06 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Linux JDK 6 with SOA-P 5.0 Beta 1
Last Closed: 2010-01-28 11:06:44 UTC
Type: Feature Request
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SOA-1763 0 None None None Never

Description Jim Tyrrell 2010-01-04 02:01:50 UTC
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-04 02:02:50 UTC
Entire source file if you wish to compare it.

Comment 2 Jim Tyrrell 2010-01-04 02:02:50 UTC
Attachment: Added: TestXsltAction.java


Comment 3 Daniel Bevenius 2010-01-04 02:40:15 UTC
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 10:08:21 UTC
Daniel is spot on, Transformer is not thread safe.

Comment 5 Jim Tyrrell 2010-01-04 14:47:59 UTC
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 16:34:25 UTC
Comment in either xslttransformation as needed

Comment 7 Jim Tyrrell 2010-01-04 16:34:25 UTC
Attachment: Added: jboss-esb.xml


Comment 8 Jim Tyrrell 2010-01-04 16:34:47 UTC
Transform XSLT file

Comment 9 Jim Tyrrell 2010-01-04 16:34:47 UTC
Attachment: Added: MyTransform.xslt


Comment 10 Jim Tyrrell 2010-01-04 16:38:05 UTC
Attachment: Added: PerformanceTesting-soapui-project.xml


Comment 11 Jim Tyrrell 2010-01-04 16:39:40 UTC
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 12:12:21 UTC
Link: Added: This issue depends JBESB-3098


Comment 13 Martin Vecera 2010-01-28 10:35:01 UTC
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 10:42:36 UTC
Sorry, what does the gateway have to do with this?

Comment 15 Martin Vecera 2010-01-28 11:06:44 UTC
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.