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

Re: Ordering of Blocks based on Input/Output

Subject: Re: Ordering of Blocks based on Input/Output
From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Wed, 9 May 2001 18:41:37 +0100
Re:  Ordering of Blocks based on Input/Output
Hi Francis,

>> And actually, the templates in both could take advantage of the
>> set:difference() extension function, which would make clearer what was
>> going on, and would improve performance if it was implemented
>> intelligently:
>> 
> Absolutely. Some optimisation here could get pretty near the heart
> of the problem. On the other hand we could end up with a situation
> where we have to check each parser for the relative speed of:
>
>         $left[count(. | $next) > 1]
> v.
>         $left[generate-id(.) != generate-id($next)]
> v. 
>         set:difference($left, $next)
>
> (Just joking, I trust...)

Well, it's "well known" that the generate-id() algorithm in Saxon used
to be (I think Mike's improved it) very intensive, so that the first
option was way better in Saxon than the second.  On the other hand,
the generate-id() function in MSXML is very quick.  Of course it
depends on how many times you're calling it, and that depends on the
structure of the rest of the stylesheet and of your data...

But my point about set:difference() was that while with the former
paths the processor is honour-bound to go through *every* node in
$left to work out whether it's the $next node or not, with
set:difference() it could stop checking at the point that it found the
$next node, knowing that the rest of the nodes in $left couldn't be
the $next node.  That means it would visit less nodes, or at least
could do if it were doing some lazy evaluation or something.

Plus of course anything that's built in to the processor is going to
be faster than constructing an equivalent XPath for it.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/



 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.