Project

Profile

Help

Bug #2679

closed

XSLT transformation is taking 15% more on 9.7.0-3 vs 9.6.0-1

Added by Guillermo Fernandes about 8 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Performance
Sprint/Milestone:
Start date:
2016-03-17
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.7
Fix Committed on Branch:
9.7
Fixed in Maintenance Release:
Platforms:

Description

Hello,

We have upgraded from 9.6.0-1 to 9.7.0-3 and while running our performance test for a simple XSLT transformation we have noticed that the same test is taking almost 15% more time to complete the transformations.

The transformation is very simple what we do is we have the following input:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://services.samples/xsd">
   <soapenv:Header/>
   <soapenv:Body>
      <xsd:buyStocks>
		<order>
			<symbol>WCZ10DLY4LI</symbol>
			<buyerID>5D7647E6-AF7F-E60E-8873-6FBE68D3C325</buyerID>
			<price>1852.81</price>
			<volume>556871</volume>
		</order>
		<order>
			<symbol>GNE09BDW7UV</symbol>
			<buyerID>4D63AC2C-983F-9DBF-0BE1-93C7FFE07810</buyerID>
			<price>8588.98</price>
			<volume>339274</volume>
		</order>
		<order>
			<symbol>PKP99XKU0XU</symbol>
			<buyerID>C81A3868-9976-3EAA-D293-3828F98ED33B</buyerID>
			<price>8412.94</price>
			<volume>67998</volume>
		</order>
		<order>
			<symbol>EVN46ILC0ZS</symbol>
			<buyerID>225A064F-D42A-B822-6CB5-8C98BEFC4456</buyerID>
			<price>7004.71</price>
			<volume>889820</volume>
		</order>
...

These input file has 6007 lines, the idea of the test is to do a reverse of each tag and then set it back again.

So we do a transformation of this input with the following xslt

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:m0="http://services.samples/xsd" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<xsl:output method="xml" omit-xml-declaration="yes" indent="no" exclude-result-prefixes="m0"/>

<xsl:template match="m0:buyStocks">

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<m:skcotSyub xmlns:m="http://services.samples/xsd">
<xsl:for-each select="order">
<redro><lobmys><xsl:value-of select="symbol"/></lobmys><DIreyub><xsl:value-of select="buyerID"/></DIreyub><ecirp><xsl:value-of select="price"/></ecirp><emulov><xsl:value-of select="volume"/></emulov></redro>
</xsl:for-each>
</m:skcotSyub>
</soapenv:Body>
</soapenv:Envelope>
</xsl:template>
<xsl:template match="soapenv:Header"></xsl:template>
</xsl:stylesheet>

And then revert it with the following xslt:

<?xml version="1.0" encoding="ISO-8859-1"?>

<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:m0="http://services.samples/xsd">
<xsl:output method="xml" omit-xml-declaration="yes" indent="no" exclude-result-prefixes="m0"/>
<xsl:template match="m0:skcotSyub">

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<m:buyStocks xmlns:m="http://services.samples/xsd">
<xsl:for-each select="redro">
<order><symbol><xsl:value-of select="lobmys"/></symbol><buyerID><xsl:value-of select="DIreyub"/></buyerID><price><xsl:value-of select="ecirp"/></price><volume><xsl:value-of select="emulov"/></volume></order>
</xsl:for-each>
</m:buyStocks>
</soapenv:Body>
</soapenv:Envelope>
</xsl:template>        
</xsl:stylesheet>

We run it 50 concurrent threads for 180 seconds and we got a TPS of ~1050 with 9.6.0-1 or 9.6.0-8 and TPS of ~855 with 9.7.0-3 and 9.7.0-4.

We are running the profiler in order to understand what were the changes introduced since 9.6.0-1 to 9.7.0-3 but couldn't find something in particular. Just that net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail() is taking now more time than previous version.

How come 9.7 is so much slower than 9.6 on that code?

Thanks!


Files

testSoapEnvelope.xml (161 KB) testSoapEnvelope.xml Guillermo Fernandes, 2016-03-17 21:07

Please register to edit this issue

Also available in: Atom PDF