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

RE: XSL Performance

Subject: RE: XSL Performance
From: "Paulo Gaspar" <Paulo.Gaspar@xxxxxxxxxxxx>
Date: Fri, 2 Jun 2000 16:24:46 +0200
xsl performance
I flagged and printed this one!

But the parser performance issue is still in my mind.

Paulo

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]On Behalf Of Kay Michael
Sent: Friday, June 02, 2000 1:48 PM
To: 'xsl-list@xxxxxxxxxxxxxxxx'
Subject: RE: XSL Performance


> There hasn't really been an answer to this question yet.
> > Are there any sites that discuss XSL's performance as it 
> pertains to the XSL code. 

The simple answer to the question is "no, there aren't". But here's a quick
attempt to fill the gap, all suggestions for enhancements are welcome.

Eight tips for how to use XSLT efficiently:

1. Keep the source documents small. If necessary split the document first.
2. Keep the XSLT processor (and Java VM) loaded in memory between runs
3. If you use the same stylesheet repeatedly, compile it first.
4. If you use the same source document repeatedly, keep it in memory.
5. If you perform the same transformation repeatedly, don't. Store the
result instead.
6. Keep the output document small. For example, if you're generating HTML,
use CSS.
7. Never validate the same source document more than once.
8. Split complex transformations into several stages.

Eight tips for how to write efficient XSLT:

1. Avoid repeated use of "//item".
2. Don't evaluate the same node-set more than once; save it in a variable.
3. Avoid <xsl:number> if you can. For example, by using position().
4. Use <xsl:key>, for example to solve grouping problems.
5. Avoid complex patterns in template rules. Instead, use <xsl:choose>
within the rule.
6. Be careful when using the preceding[-sibling] or following[-sibling]
axes. This often
   indicates an algorithm with n-squared performance.
7. Don't sort the same node-set more than once. If necessary, save it as a
result tree fragment
   and access it using the node-set() extension function.
8. To output the text value of a simple #PCDATA element, use <xsl:value-of>
in preference
   to <xsl:apply-templates>.

Mike Kay


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


 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.