"Martin Honnen" <ma*******@yahoo.dewrote in message
news:eT*************@TK2MSFTNGP05.phx.gbl...
Andy Fish wrote:
>From reading the documentation, I get the impression that
XslCompiledTransform should be faster than XslTransform
on my test with a large complex document and a large complex XSLT, the
transform took 4 minutes with XslTransform but 7 minutes with
XslCompiledTransform.
However, with the same stylesheet on another large complex document, the
time dropped from 4 minutes with XslTransform to just 45 seconds with
XslCompiledTransform.
any clues as to what might cause this difference in performance? is one
of my results exceptional?
When you call the Load method then XslCompiledTransform compiles the XSLT
stylesheet to MSIL. That often takes longer than loading with
XslTransform. On the other hand executing the Transform method, in
particular several times with a compiled stylesheet, should perform much
better with XslCompiledTransform.
See <http://blogs.msdn.com/antosha/archive/2006/07/24/677560.aspxfor
some detailed comparison.
Thanks for the quick response Martin. I have tried running the same compiled
transformation against the document twice and it was not appreciably quicker
the second time.
I had seen your link and several other related articles and noticed that
they usually put their timings in milliseconds whereas mine are in minutes
(!!), so I wasn't expecting the JIT overhead to be that significant. note
that smaller documents run in a couple of seconds with the same transform.
Andy
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/