Frequently Rare

Thursday, June 08, 2006

MSXML Vs XslTransform

A colleague was having some issues with the speed the XslTransform class (.Net Framework 1.1) was performing at. A transformation was taking over 60 seconds.

I took a look but couldn't see anything wrong; he was using strings so I increased the size of various string buffers to see if there was any effect. None.

Now I know that the MSXML4 parser is faster than the framework parser, so I thought I'd do a little test. Importing the references to the MSXML4 parser and rewriting a portion of the code to use the MSXML2.DOMDocument40Class resulted in the transformation executing in less than a second.

Less than a second. Ouch. I knew MSXML was faster, but not that much!

I have some other transformations that use <xsl:key to grab a unique collection of certain nodes from my document. These seem to take a lot longer using the .Net parser compared to MSXML.

A bit of research reveals the answer.

XslTransform has been deprecated in Framework 2.0. Heh.

0 Comments:

Post a Comment

<< Home