[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Lesson learned: how to reduce execution time from 26 minutes to 16 seconds


Subject: [xsl] Lesson learned: how to reduce execution time from 26 minutes to 16 seconds
From: "Costello, Roger L. costello@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 8 Nov 2014 15:41:47 -0000

Hi Folks,

You've got a long, linear sequence of <row> elements to process. You access
each <row> element like so:

	/*/row[position() eq $counter]

where $counter is an incrementing counter.

I wrote my XSLT program that way. My input data consisted of over 110,000
<row> elements. My program took 26 minutes to execute! Ouch!

I then modified my program to instead access each <row> element like so:

	following-sibling::row[1]

When I ran my revised XSLT program, the execution time dropped to 16 seconds!
Yes!

/Roger


Current Thread
Keywords