Well, you have XslTransform (slow) runtime compared to XslCompiledTransform compilation time and its (fast) runtime. There is no theoretical way to finally solve this comparison.
The theory suggests: runtime depends on input and required operations, and compilation time depends on XSLT complexity. Practice confirms that with trivial input and complex XSLT, a single execution of XslTransform will certainly be faster.
However, for all real-world applications, you will need XslCompiledTransform, if only because XslTransform is outdated and may very contain flaws that will never be fixed. I actually had some styles that behave strangely under XslTransform and work fine under XslCompiledTransform.
Wiebe cnossen
source share