Saxon-9.6.0.1j: performance regression with computed positional predicates in <xsl:key>

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Saxon-9.6.0.1j: performance regression with computed positional predicates in <xsl:key>

ron.vandenbranden
Hi,

In a production XSLT stylesheet, I'm experiencing a dramatic performance
drop between Saxon-he-9-5.1.7j and Saxon-he-9.6.0.1j. While the same
transformation completes in about 7 seconds with Saxon-he-9-5.1.7j, it
takes 8 minutes with Saxon-9.6.0.1j.

I think I've been able to more or less isolate the issue. Attached is a
zip file containing:
      -a test input file (keytest-input.xml)
      -a test XSLT stylesheet (keytest.xsl)
      -an auxiliary file (keytest-lookup.xml) that is used in the
transformation
This test is a bare-bone detail of what's happening in a real-life
stylesheet. It basically looks up entries in a lookup table that
correspond with values in the input. Of note is the fact that the key
for locating the lookup entry is computed dynamically with a function,
which is used to compute a positional predicate in the <xsl:key/>
definition.
While the test case runs in 0.975s in Saxon-he-9-5.1.7j, it takes 1m 28s
to complete in Saxon-he-9.6.0.1j (trace output attached).

The bottleneck seems to be the use of a function for computing a
positional predicate in the @match attribute of an <xsl:key> definition.
Regardless of the motivation for doing so (in my case, the format of the
lookup tables may vary, so I want to be able to select the lookup entry
by field name), this seems a regression in Saxon-he-9.6.0.1j.

I hope a) this is the right place for a report like this, and b) the
report and test case are usable (I've tried to isolate the issue as much
as possible). I'm happy to help if more details are needed.

Best,

Ron


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 

keytest.tgz (30K) Download Attachment
keytest-trace.tgz (886 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Saxon-9.6.0.1j: performance regression with computed positional predicates in <xsl:key>

Michael Kay
At first sight it looks like this one:

https://saxonica.plan.io/issues/2367

which was fixed in 9.6.0.6. Could you please try it with that release?

Michael Kay
Saxonica


> On 9 Jul 2015, at 23:44, [hidden email] wrote:
>
> Hi,
>
> In a production XSLT stylesheet, I'm experiencing a dramatic performance drop between Saxon-he-9-5.1.7j and Saxon-he-9.6.0.1j. While the same transformation completes in about 7 seconds with Saxon-he-9-5.1.7j, it takes 8 minutes with Saxon-9.6.0.1j.
>
> I think I've been able to more or less isolate the issue. Attached is a zip file containing:
>     -a test input file (keytest-input.xml)
>     -a test XSLT stylesheet (keytest.xsl)
>     -an auxiliary file (keytest-lookup.xml) that is used in the transformation
> This test is a bare-bone detail of what's happening in a real-life stylesheet. It basically looks up entries in a lookup table that correspond with values in the input. Of note is the fact that the key for locating the lookup entry is computed dynamically with a function, which is used to compute a positional predicate in the <xsl:key/> definition.
> While the test case runs in 0.975s in Saxon-he-9-5.1.7j, it takes 1m 28s to complete in Saxon-he-9.6.0.1j (trace output attached).
>
> The bottleneck seems to be the use of a function for computing a positional predicate in the @match attribute of an <xsl:key> definition. Regardless of the motivation for doing so (in my case, the format of the lookup tables may vary, so I want to be able to select the lookup entry by field name), this seems a regression in Saxon-he-9.6.0.1j.
>
> I hope a) this is the right place for a report like this, and b) the report and test case are usable (I've tried to isolate the issue as much as possible). I'm happy to help if more details are needed.
>
> Best,
>
> Ron
>
> <keytest.tgz><keytest-trace.tgz>------------------------------------------------------------------------------
> Don't Limit Your Business. Reach for the Cloud.
> GigeNET's Cloud Solutions provide you with the tools and support that
> you need to offload your IT needs and focus on growing your business.
> Configured For All Businesses. Start Your Cloud Today.
> https://www.gigenetcloud.com/_______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: Saxon-9.6.0.1j: performance regression with computed positional predicates in <xsl:key>

ron.vandenbranden
In reply to this post by ron.vandenbranden
Hi Michael,

Thanks for your quick reply. That must have been it: it runs ok with
9.6.0.6.

I hadn't realized 9.6.0.1 was that old; I just assumed the latest Oxygen
would ship the latest available version of Saxon. My bad; I'll check
against the latest version next time!

Best,

Ron

> At first sight it looks like this one:
>
> https://saxonica.plan.io/issues/2367
>
> which was fixed in 9.6.0.6. Could you please try it with that release?
>
> Michael Kay Saxonica
>
>
>

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: Saxon-9.6.0.1j: performance regression with computed positional predicates in <xsl:key>

Radu Coravu
Hi Ron,

Oxygen 17.0 comes with Saxon 9.6.0.5 bundled.
And Oxygen 17.1 (autumn this year) will have Saxon 9.6.0.6 (or newest
available version) integrated.
You cannot upgrade the Saxon libraries used by Oxygen manually because
we have various patches (mostly for the XSLT debugger) which may break
if they are not compatible with the modified Saxon libraries.

Regards,
Radu

Radu Coravu
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

On 7/10/2015 10:27 AM, [hidden email] wrote:

> Hi Michael,
>
> Thanks for your quick reply. That must have been it: it runs ok with
> 9.6.0.6.
>
> I hadn't realized 9.6.0.1 was that old; I just assumed the latest Oxygen
> would ship the latest available version of Saxon. My bad; I'll check
> against the latest version next time!
>
> Best,
>
> Ron
>
>> At first sight it looks like this one:
>>
>> https://saxonica.plan.io/issues/2367
>>
>> which was fixed in 9.6.0.6. Could you please try it with that release?
>>
>> Michael Kay Saxonica
>>
>>
>>
>
> ------------------------------------------------------------------------------
> Don't Limit Your Business. Reach for the Cloud.
> GigeNET's Cloud Solutions provide you with the tools and support that
> you need to offload your IT needs and focus on growing your business.
> Configured For All Businesses. Start Your Cloud Today.
> https://www.gigenetcloud.com/
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help
>



------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help