[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] comments take time? XSLT 1.0


Subject: Re: [xsl] comments take time? XSLT 1.0
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Mon, 14 Oct 2013 10:32:16 -0700

An easy benchmark would be to add different number of comments
(incremented for each case by 100 or by 1000) to the identity
transform.

Then run each transformation on the same, of typical size XML document
(10 times for each case) and record the average timing.

Then, if the result varies more than 1% from the non-commented version
-- complain to the vendors.

More importantly, in the case of .NET, one can compile the
transformation into a dll -- using the xsltc.exe utility.

This guarantees exactly the same time, regardless of the
quantity/fraction of the comments in the serialized (initial textual)
transformation. It also runs a lot faster than the uncompiled version,
in case the same transformation must be run multiple times.

Cheers,
Dimitre

On Mon, Oct 14, 2013 at 8:49 AM, davep <davep@xxxxxxxxxxxxx> wrote:
> I'm being told that I should strip all comments out as they slow down
> the processing of xml using xslt 1.0, specifically the msxsl transform
> engine.
>
>
> Has anyone done any measurements on this please?
> Any suggestions as to the impact?
> What kind of overhead - assuming no templates match on comments explicitly.
>
>
>
> Even if not with the Microsoft engine.
>
>
> regards
>
> --
> Dave Pawson
> XSLT XSL-FO FAQ.
> http://www.dpawson.co.uk
>



-- 
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
Never fight an inanimate object
-------------------------------------
To avoid situations in which you might make mistakes may be the
biggest mistake of all
------------------------------------
Quality means doing it right when no one is looking.
-------------------------------------
You've achieved success in your field when you don't know whether what
you're doing is work or play
-------------------------------------
Facts do not cease to exist because they are ignored.
-------------------------------------
Typing monkeys will write all Shakespeare's works in 200yrs.Will they
write all patents, too? :)
-------------------------------------
I finally figured out the only reason to be alive is to enjoy it.


Current Thread
Keywords