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

Re: problem: recursive templates slowing xalan process

Subject: Re: problem: recursive templates slowing xalan processor down
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Mon, 10 May 2004 21:58:51 +0100
how to use xmlspy
Hi Chris,

> im having a peculiar problem, ive made a xsl stylesheet that uses a
> recursive template. When i use xmlspy to perform the xsl
> transformation on a sample xml file everything works fine, but when
> i use a xalan processor (org.apache.xalan.xslt.Process) the
> recursive template seems to freeze the processing. First I pass
> about 15 nodes to the template wich then calls itself with one node
> less. and so on. In the beginning it goes fast but after 3 recursive
> calls everything slows down and finally looks like its frozen (in
> fact i still get some output but only after very long times). Is it
> possible that several recursive calls freeze the processor and how
> come everything works with the xmlspy debugger??

I don't know which processor the XML Spy debugger uses, but it might
be that it rewrites (tail) recursive calls into a loop and thus deals
with the recursion more efficiently than Xalan.

Having said that, Xalan is normally pretty good at that kind of
optimisation. (Perhaps you're using an old version? Check which
version you're using with system-property('xsl:version').) Seeing a
slowdown after only three recursive calls sounds quite severe.

Can you show us your recursive template? Perhaps there are some
rewrites that could help speed it up...

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/

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.