Checklist: XML Performance
Retired Content |
---|
This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
Improving .NET Application Performance and Scalability
J.D. Meier, Srinath Vasireddy, Ashish Babbar, and Alex Mackman
Microsoft Corporation
May 2004
Related Links
Home Page for Improving .NET Application Performance and Scalability
Send feedback to Scale@microsoft.com
How to Use This Checklist
This checklist is a companion to Chapter 9, "Improving XML Performance"
Design Considerations
Check | Description |
---|---|
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. |
Parsing XML
Check | Description |
---|---|
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. |
Validating XML
Check | Description |
---|---|
Use XmlValidatingReader. | |
Do not validate the same document more than once. | |
Consider caching the schema. |
Writing XML
Check | Description |
---|---|
Use XmlTextWriter. |
XPath Queries
Check | Description |
---|---|
Use XPathDocument to process XPath statements. | |
Avoid the // operator by reducing the search scope. | |
Compile both dynamic and static XPath expressions. |
XSLT Processing
Check | Description |
---|---|
Use XPathDocument for faster XSLT transformations. | |
Consider caching compiled style sheets. | |
Consider splitting complex transformations into several stages. | |
Minimize the size of the output document. | |
Write efficient XSLT. |
Retired Content |
---|
This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |