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

Re: Practical Suggestion for XSLT Performance Improvement

Subject: Re: Practical Suggestion for XSLT Performance Improvement
From: "Oren Ben-Kiki" <oren@xxxxxxxxxxxxx>
Date: Thu, 7 Oct 1999 10:11:10 +0200
xslt performance improvement
For good or bad, XSLT was designed as a "single pass on the output document"
instead of "single pass on the input document". Using streams for achieving
the first goal is an old technique; those interested should take a look as
how the M4 macro processor handles the issue, for example (anyone has any
idea when M4 was written?). XSLT's approach does potentially cause
performance problems for large input documents.

However, I'm not convinced that solving the current performance problem
calls for the changes you propose. I suspect that simply removing the
restrictions on matching on result tree fragments would solve most of the
problem. This is much more in the XSLT spirit then using streams or mutable
hash tables. It would be interesting to repeat the benchmarks on an XSLT
processor which supports this extension and check the relative speed of this
approach.

Until the time that this restriction is lifted, it can be approximated by
using string operations. Using a template which accepts the current totals
as a string containing "<product>:<sum>:<product>:<sum>:..." and evaluates
to an updated one, it is possible to do a single pass on the input
collecting the sums. Then implement a single pass on the string generating
the output. This is terribly inelegant, however. The real value of such
hacks is in proving that the perceived advantages for restricting matching
on result tree fragments are illusory:-)

Have fun,

    Oren Ben-Kiki


 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.