Compartir vía


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.

patterns & practices Developer Center

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

patterns & practices Library

How to Use This Checklist

This checklist is a companion to Chapter 9, "Improving XML Performance"

Design Considerations

Check Description
Ff647691.checkbox(en-us,PandP.10).gif Choose the appropriate XML class for the job.
Ff647691.checkbox(en-us,PandP.10).gif Consider validating large documents.
Ff647691.checkbox(en-us,PandP.10).gif Process large documents in chunks, if possible.
Ff647691.checkbox(en-us,PandP.10).gif Use streaming interfaces.
Ff647691.checkbox(en-us,PandP.10).gif Consider hard-coded transformations.
Ff647691.checkbox(en-us,PandP.10).gif Consider element and attribute name lengths.
Ff647691.checkbox(en-us,PandP.10).gif Consider sharing the XmlNameTable.

Parsing XML

Check Description
Ff647691.checkbox(en-us,PandP.10).gif Use XmlTextReader to parse large XML documents.
Ff647691.checkbox(en-us,PandP.10).gif Use XmlValidatingReader for validation.
Ff647691.checkbox(en-us,PandP.10).gif Consider combining XmlReader and XmlDocument.
Ff647691.checkbox(en-us,PandP.10).gif On the XmlReader, use the MoveToContent and Skip methods to skip unwanted items.

Validating XML

Check Description
Ff647691.checkbox(en-us,PandP.10).gif Use XmlValidatingReader.
Ff647691.checkbox(en-us,PandP.10).gif Do not validate the same document more than once.
Ff647691.checkbox(en-us,PandP.10).gif Consider caching the schema.

Writing XML

Check Description
Ff647691.checkbox(en-us,PandP.10).gif Use XmlTextWriter.

XPath Queries

Check Description
Ff647691.checkbox(en-us,PandP.10).gif Use XPathDocument to process XPath statements.
Ff647691.checkbox(en-us,PandP.10).gif Avoid the // operator by reducing the search scope.
Ff647691.checkbox(en-us,PandP.10).gif Compile both dynamic and static XPath expressions.

XSLT Processing

Check Description
Ff647691.checkbox(en-us,PandP.10).gif Use XPathDocument for faster XSLT transformations.
Ff647691.checkbox(en-us,PandP.10).gif Consider caching compiled style sheets.
Ff647691.checkbox(en-us,PandP.10).gif Consider splitting complex transformations into several stages.
Ff647691.checkbox(en-us,PandP.10).gif Minimize the size of the output document.
Ff647691.checkbox(en-us,PandP.10).gif Write efficient XSLT.

patterns & practices Developer Center

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.

© Microsoft Corporation. All rights reserved.