RE: [xsl] Optimizing a XSLT

Subject: RE: [xsl] Optimizing a XSLT
From: "Philip Fitzsimons" <pfitzsimons@xxxxxxxxxxx>
Date: Mon, 14 Apr 2003 22:18:09 +0100
What version of msxml/msxsl - make sure you are using 4.o its much
faster.

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Eric Barre
Sent: 14 April 2003 19:45
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE: [xsl] Optimizing a XSLT


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@xxxxxxxxxxxxx] 
Sent: Monday, April 14, 2003 11:35 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
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


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


Current Thread