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

Re: Re: HOWTO: convert flat list w/ level information

Subject: Re: Re: HOWTO: convert flat list w/ level information to a hierarchialone?u
From: David Tolpin <dvd@xxxxxxxxxxxxxx>
Date: Wed, 3 Dec 2003 12:53:16 +0400 (AMT)
flat list to hierarchy algorithm
> 
> It is nice to produce a fast algorithm but it is even nicer when this
> algorithm is correct.

Dimitre,

Everyone makes typos. I was coding after the prototype in Haskell, the version
in XSLT takes the head of each level in the hierarchy from the source data,
so it should take the initial base from the source; this way it works with
all levels, including negatives, and handles non-contiguous ranges properly.

http://davidashen.net/~dvd/hier.xsl

> Unfortunately, I could not reproduce the timing results you claim hold for
> the transformation I proposed. Probably you are using a very slow XSLT
> processor on a slow machine.

I am using SAXON 6.5.3 or XT on a FreeBSD/JDK 1.3.1 700MHz Pentium II.
MSXML4 is a fast processor indeed.

> 
> The timing results I get with MSXML4 on a 800MHz Pentium with 512MB RAM
> under W2K are the following:

> 
> With 100 nodes the stylesheet execution times vary in the range 90 - 140
> milliseconds.
> 
> With 200 nodes the time range was 708 - 1106 milliseconds.
> 

Look, the time is exponential. Try to run it with 400 nodes. 

Why do you think that my algorithm will expect problems with large data input?
My computer only has 128 MBytes of the RAM, and with JVM heap configured at
100Mb it formatted 10,000 nodes. 

The problem with algorithm which require lookahead for arbitrary number of nodes
is that they have exponential computation time.

David

 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.