[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: I need to learn more about optimizing my code

Subject: RE: I need to learn more about optimizing my code
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Thu, 18 Oct 2001 09:41:25 +0100
xsl count optimize time
> I need to learn more about optimizing my code.  Is there a
> website or book
> that has some depth on this?  What kind of xpath statements are more
> processor intensive than others?  What XSLT processors are
> the fastest?
> How much does the size of the XML file being read in factors
> into the time
> it takes to process the translation?

The two biggest factors are the size of the source XML file and the number
of times you visit each node. The difficult bit is that the processor may
optimize your expressions to reduce the number of node visits, for example
if you write

preceding-sibling::*[1]

then it will probably only visit the first preceding sibling, rather than
visiting them all and discarding all but the first. Of course different
processors have difference optimizations, which means that the performance
of something like

<xsl:if test="count(//item)=0">

may vary dramatically from one processor to another.

But the usual discipline applies: look for the most deeply nested loops,
remembering that loops can either be explicit (apply-templates or for-each),
or implicit in path expressions (a/b/c, or //a).

Mike Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.