Re: Practical Suggestion for XSLT Performance Improvement

Subject: Re: Practical Suggestion for XSLT Performance Improvement
From: crism@xxxxxxxxxxxxx (Christopher R. Maden)
Date: Thu, 7 Oct 1999 12:56:43 -0700
>I don't see how what I was suggesting would at all hurt
>incremental rendering.

Well, not hurt, necessarily, but not be usable with.  Both DSSSL and XSLT
were careful to avoid side effects so that processing could start at any
point and still have the same results.  In an editor, for example, if a
user alters a document at one point - let's say they insert a new element -
the stylesheet can be re-applied locally to get a close approximation of
the result of rendering the entire document.  Similarly, in a browser, if a
user requests a fragment of a document, there's no reason that the browser
has to render everything leading up to the beginning of the fragment, at
least not right away.  With named pipes, this means that the children will
be rendered correctly, but if the parents' rules haven't been processed,
then the pipes haven't been created and the children won't write to them.
When the parent is processed (possibly after the children), the pipe won't
be there for proper processing to occur.

It's true that to get precise rendering, you have to start at the root rule
and evaluate other templates only when explicitly instructed to do so by an
<xsl:apply-templates/> or such.  However, even in that environment, a fast
processor might jump ahead and prepare child result nodes for use by their
parents, and that's prevented by the pipes approach.

And I disagree that the pipes approach would permit disposition of the
input document immediately; only in very limited cases are there never
going to be back-references in the data, and asking a stylesheet author to
explicitly account for every possible one is unreasonable.  Your view of
your model as a sort of assembly model, to which a stylesheet could be
compiled, is interesting, but really a stylesheet would need to be analyzed
together with a specific input document in order to determine which
dependencies were forwards and which were backwards, at which point, the
document might just as well be processed at that time.

-Chris

--
Christopher R. Maden, Solutions Architect
Exemplary Technologies
One Embarcadero Center, Ste. 2405
San Francisco, CA 94111



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread