Re: [xslt] efficiency



Thanks. I'll check that out.

Well, I've figured out that doing this:

select="//page/@id"

...in a loop is bad.

Since I use that value in a lot of places, I did this at the top of the
stylesheet file:

<xsl:variable name="pageid" select="//page/@id"/>

and refer to $pageid rather than //page/@id

...  one order of magnitude faster.


----- Original Message -----
From: "Daniel Veillard" <veillard@redhat.com>
To: <xslt@gnome.org>
Sent: Thursday, May 23, 2002 2:42 AM
Subject: Re: [xslt] efficiency


> On Thu, May 23, 2002 at 02:33:12AM -0400, Michael Rothwell wrote:
> >
> > >   use --profile to see in which templates the time is spent. Like
any...
> >
> > Thanks; I found the culprit. Do you know of any documentation along the
> > lines of "writing efficient xslt?"
>
>   the best is to check on the xsl-list, and the FAQ maybe, pointers are
from
> the "getting help" page:
>    http://xmlsoft.org/XSLT/bugs.html
>
> Daniel
>
> --
> Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
> veillard@redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
> http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
> _______________________________________________
> xslt mailing list, project page http://xmlsoft.org/XSLT/
> xslt@gnome.org
> http://mail.gnome.org/mailman/listinfo/xslt
>




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]