Now a days every .NET developer make use of Xml in some way or the other. But when you are middle tier developer, then you can’t get rid of xml manipulation. The performance of an application significantly affects the way we use code for reading, writing, parsing, quering and validating Xml documents.
Here are certain guidelines to address xml perfornace issues in .NET applications.
Performance and Scalability Issues
Extreme memory consumption
Inappropriate use of the DataSet
Failure to cache and to precompile schemas, style sheets, and XPath queries
Inefficient data retreival
Choose the appropriate XML class for the job
Consider validating large documents
Process large documents in chunks if possible
Use streaming interfaces
Consider hard-coded transformations
Consider element and attribute name lengths
Consider sharing the XmlNameTable
Use XmlTextReader to parse large XML documents
Use XmlValidatingReader for validation
Consider combining XmlReader and XmlDocument
On the XmlReader use the MoveToContent and Skip methods to skip unwanted items
This entry was posted on Friday, April 30th, 2010 at 17:52 and is filed under C# General. You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.