xsl-list
[Top] [All Lists]

RE: copy vs. copy-of performance in xsltproc

2004-10-05 03:38:11
Intrinsically one would expect copy-of to be a bit faster than a recursive
descent applying template rules to every node, but of course the actual
answer for a particular product (and source document) can only be obtained
by measurement. It may depend on how many other template rules there are.

If you have a performance problem, I think that any difference here is
unlikely to be the solution to it. (And if you don't, why trouble yourself?)

Michael Kay
http://www.saxonica.com/ 


-----Original Message-----
From: Werner, Wolfgang [mailto:mail(_at_)wolfgang-werner(_dot_)net] 
Sent: 05 October 2004 09:45
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] copy vs. copy-of performance in xsltproc

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

has any of you experience regarding the performance of copy 
compared to
copy-of in xsltproc?
Right now I'm copying some parts of the source tree completly while
filtering some other parts.
I use the following template:

~  <xsl:template match="/ | @* | node()">
~    <xsl:copy>
~      <xsl:apply-templates select="@* | node()"/>
~    </xsl:copy>
~  </xsl:template>

My question is, if I want to copy a complete element, is it 
faster to use

~  <xsl:template match='dontfilterme'>
~    <xsl:copy-of select='.'/>
~  </xsl:template>

or the default template above?
How much does the complexity of the copied element influence 
the speed?

Any pointers appreciated,
Wolfgang
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBYl8JqjaicDyx8o8RAtBrAJ91d6Xl6aWTPlx237bBzlsvAP4/ZgCfYla/
UbqeRlsJgfxzdOZ9jLmDE4U=
=/bpn
-----END PGP SIGNATURE-----

--+------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--+--





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