Performance of LINQ to XML
It can be problematic for us here at Microsoft to make specific performance claims of one technology to another, for example, comparing the performance of XmlDocument, say, to LINQ to XML. A good programmer can write code in any number of technologies that will perform well, and a bad programmer can certainly make mistakes that dramatically affect performance.
However, it turns out that there are a number of issues and dynamics that we can talk about with regards to performance of LINQ to XML. So, I am adding a few topics to the LINQ to XML documentation that highlight various performance dynamics. This post is a preview of the LINQ to XML topics on performance.
For all of the LINQ and LINQ to XML experts out there, please feel free to let me know of other perf techniques and information.
I've added four performance pages:
Performance of Chained Queries
Provides some analysis regarding the performance of chained LINQ to XML queries.
Atomized XName and XNamespace Objects
Describes the performance implications of atomization of XName and XNamespace objects.
Preatomization of XName Objects
Describes a technique to pre-atomize XName and XNamespace objects, which can significantly improve performance in certain scenarios.
Examines the performance implications of statically compiled queries in contrast to the parsing and processing that must be done by an XPath expression evaluator.
Comments
Anonymous
December 06, 2007
It can be problematic for us here at Microsoft to make specific performance claims of one technologyAnonymous
July 13, 2008
This post presents a snippet of code to remove comments from an Open XML Wordprocessing document. Note:Anonymous
August 28, 2008
[Table of Contents] [Next Topic] Our next goal is to retrieve the text of the paragraphs in the document.