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

XSLT optimisation

Subject: XSLT optimisation
From: Alexander Johannesen <alex@xxxxxxxxxx>
Date: Fri, 28 Mar 2003 17:10:53 +0100
xslt optimisation
Hi,

For my project (see .sig), which deals with rather big flat-
structured XML files (XTM topic maps), I'm reaching a phase where I'm about to look into some serious optimalisation of the code. I'm looking for the best tips and tricks for this. My examples are;


<xsl:variable name="topics" select="/topicMap/topic" />

which can contain several thousands of complex "topic" nodes. I
realise that both key() and <xsl:copy> are ways of improving
the speed of processing, but my knowledge of how to use them
is a bit flakey. Any good resources or suggestions on this? I
usually would use it as such;

<xsl:variable name="a-selection" select="$topics[starts-with(@id, 'some- text')]"
/>


And then either <xsl:for-each /> them, or otherwise use them in further XPath expressions. Another heavy-on-the-processing method I'm using is the similar;

<xsl:variable name="associations" select="/topicMap/association" />

which also can contain thousands of "association" nodes with lots of
sub-nodes. I perform quite complex XPath searches on this one, such as;

<xsl:variable name="currentID" select="'some-id'" />

  <xsl:variable name="theseOnes" select="$associations
        [instanceOf/topicRef/@xlink:href='#group-subgroup']
        [member/topicRef/@xlink:href=concat('#',$currentID)]
        /member[roleSpec/topicRef/@xlink:href='#child']
        /topicRef"/>

And some expressions even more complex than this, also including
recursive calling of the templates. (I guess it is hard to understand
all of this without seeing the full code)

One serious consideration I have is to move all of this processing
away from XPath (and xSLT) and use JavaScript (in a parser that
supports it) instead. The question is of course if the work I need
to do in order to get it all into JavaScript is worth it if there
are some good optimalisations of XSLT I can do first. :)

Anyways, I'm looking forward to any suggestions that you might have.


Kind regards,


Alexander
--
__________________ ________________________ ____________________________
                 |                        |
http://shelter.nu | alex at shelter dot nu | http://shelter.nu/xsiteable
__________________|________________________|____________________________

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.