Why is XslTransform So Slow?

Jeffrey and I finished our work in Paris today and are looking forward to heading home bright and early tomorrow morning. As we bid au revoir to France, we’re left with a burning question: why is the .NET Framework’s XslTransform class so slow?

It’s no secret to anyone who has used XslTransform that XslTransform.Transform is orders of magnitude slower than MSXML.dll at performing XSL transformations. XslTransform has been rewritten in Whidbey for exactly this reason, but informal tests show that in beta 1, it’s still WAY slower than MSXML.dll. Maybe this is simply because it’s a beta, but I’m worried.

I know of at least one group in Microsoft that worked around the problem by using interop to call out to MSXML.dll. But it also seems that MSXML.dll calls SuspendThread, which can wreak havoc with the CLR’s garbage collector. Which means Microsoft lacks a viable solution for transforming XML data in managed code. Has anyone else ran into this problem? If so, has anyone found a decent solution?

 

Stay Informed

Sign up for the latest blogs, events, and insights.

We deliver solutions that accelerate the value of Azure.
Ready to experience the full power of Microsoft Azure?

Atmosera is thrilled to announce that we have been named GitHub AI Partner of the Year.

X