xsl-list
[Top] [All Lists]

RE: Optimizing a XSLT

2003-04-14 11:45:16
Jeff,

Thanks for the input. 
Every time I tried using an element value from the input XML as an
attribute for the output XML I got an error unless I used the
disable-output-escaping format.
I am using MSXML for the parser, but I also tried Xerces and the result
came back in about 20 minutes which is better but still way to long.

Thanks,
Eric Barre

-----Original Message-----
From: Jeff Kenton [mailto:jkenton(_at_)datapower(_dot_)com] 
Sent: Monday, April 14, 2003 11:35 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Cc: Eric Barre
Subject: Re: [xsl] Optimizing a XSLT


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>