xsl-list
[Top] [All Lists]

Re: Optimizing a XSLT

2003-04-14 11:35:21
Eric Barre wrote:
Hi,
I wrote a XSL file to transform a XML file to another XML file,
everything works fine on small file but eventually I will be using it
against large XML file (over 1mg).
When I run it against such a large file it takes for ever to return, I
mean I have to kill it after running for an hour.
Is there a way to optimize the XSL that I have to make it perform
better?
Here is the 'input' XML:
   ...
The XSL:
   ...
After reading some posting I tried to stay away from the <xsl:for-each>
as much as possible as well as using variables and parameters.
If anyone could let me know a way to optimize this I would appreciate
it.

The only thing I notice is that almost any use of disable-output-escaping is usually a 
sign of "doing things the hard way".  I would recommend removing all of them in 
favor of using XSLT to generate your XML the way it was intended to be done.

Having said that, it's probably not the cause of your speed problems.  Some 
XSLT processors are just faster than others.  One Meg is not that huge an input 
file -- my guess is that a decent XSLT engine should handle it in under 1 
minute.  Try a different engine.


--

--------------------------
Jeff Kenton
DataPower Technology, Inc.
Wire Speed XSLT Processing



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



<Prev in Thread] Current Thread [Next in Thread>