So I took a specific hot-spot from a very large web application, that does lot of XML processing (adding nodes, adding attributes to nodes based on some logic), then created a standalone test to mock the same situation using Linq to XML (as opposed to XmlDocument)
There was 2 to 10 times performance improvement in the standalone test comparing Linq To Xml with using XmlDocument.
Now the same change was applied to the web application, but the improvement didn't show up for both Performance and Memory - at all, it came out to be the almost the same as using XmlDocument. All other factors/code were same before and after, so it was made sure there were no other changes.
Apart from Concurrency - web requests, I am not sure why this would happen.
Any suggestions would be appreciated. Has anyone else come across similar behaviors?
[Tests were run on Windows XP and Windows Server 2003 running .Net framework 3.5]
Update: Also I've to mention there is no disk IO involved in here. The XML is constructed on the fly in-memory, and is not written back to a file or anything. It's used only to be able to pass to another external system, which expects it. The external system is unchanged before and after.