I am migrating an existing ASP app that uses XSLT transformations to render against a language XML doc for localization and other items. When I moved this logic into .NET and the native xml and xsl objects I noticed a significant processor hit on the web machine.
The xml file is roughly 110KB and the XSLT files, the called transformation has several includes, is in total about 20KB. I have run the application test center on the page which contains the below code and it seems to indicate resonable response times but the web server CPU in task manager is pegged at 100%. Even individual requests when run via the browser peg the process. I have narrowed it down to transformations as a page that does not contain any transforamtions barely tweaks the processor. Below is the VB code, if I remove the transform line then the page again barely tweaks the CPU in task manager.
Dim objXML As New XmlDataDocument()
objXML.Load(Server.MapPath("shared/x/siteData.xml"))
Dim objXSL As New XslTransform()
objXSL.Load(Server.MapPath("scripts/clnt.home.body.xslt"))
objXSL.Transform(objXML, Nothing, Response.OutputStream)
objXML = Nothing
objXSL = Nothing
Is there a known issue with transformation or is there a better way of doing this. Of interest when I used MSXML4.0 in .NET I did not get this problem even though MS states you should not use it.
Any thought?
Keith Chadwick
PS: I will be using Page caching to reduce the server load but still would like to know whats up?