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

Re: Slow XSLT

Subject: Re: Slow XSLT
From: "Manfred Staudinger" <manfred.staudinger@xxxxxxxxx>
Date: Sun, 2 Mar 2008 17:55:28 +0100
Re:  Slow XSLT
On 02/03/2008, Cleyton Jordan <cleytonjordan@xxxxxxxxxxx> wrote:
>  One thing I will have to figure out is a way to
>  measure the speed improvement. I do not want to only
>  look at the watch and count the seconds.
>
>  I might use Javascript with the time function and
>  alert how long each approach takes (start time - end
>  time). Do you have any suggestions on how I could
>  measure that in an easier way?
As XSLT does not allow you to measure time intervals (side-effects),
it would be best to use Javascript for that.

>  Also, I did not quite understand your the simpler
>  approach suggestion. Could you please elaborate a bit
>  more on that?
>
>  > Another (simpler) approach would be to limit the
>  > maximum number of
>  > dimensions for the table so you can use match
>  > patterns like
>  > match="ColGrp"
>  > match="ColGrp/ColGrp"
>  > match="ColGrp/ColGrp/ColGrp"
>  > match="ColGrp/ColGrp/ColGrp/ColGrp"
>  > match="ColGrp[Col]"
>  > match="Col"
Templates with these match patterns would process ColGrp elements with
the same "depth" only and you would know in advance which one it is.
You also may want to make the priority of those templates explicit by
using priority="nn" where nn=10, 11, 12, 13 and 14 (from top to
bottom) for 5 levels of ColGrp elements.
   match="ColGrp" priority="10"
   match="ColGrp/ColGrp" priority="11"
   match="ColGrp/ColGrp/ColGrp" priority="12"
   match="ColGrp/ColGrp/ColGrp/ColGrp" priority="13"
   match="ColGrp[Col]" priority="14"
If you get a ColGrp element to be processed (because of the intrinsic
selection process) then a match with the templates is attempted in
priority order. The second match pattern for example specifies
"ColGrp/ColGrp" which means it will take any ColGrp elements which
have an other ColGrp element as its parent. Because of the priority
rules it matches only the depth=1 level.

Hope this helps,

Manfred
If the table happens to have less than maximum levels this would do no
harm (performance-wise).

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.