Re: [xsl] Re: HOWTO: convert flat list w/ level information to a hierarchial one?u

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


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.

> 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.


 XSL-List info and archive:

Current Thread