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?