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

CheckDescription
Ff647691.checkbox(en-us,PandP.10).gifChoose the appropriate XML class for the job.
Ff647691.checkbox(en-us,PandP.10).gifConsider validating large documents.
Ff647691.checkbox(en-us,PandP.10).gifProcess large documents in chunks, if possible.
Ff647691.checkbox(en-us,PandP.10).gifUse streaming interfaces.
Ff647691.checkbox(en-us,PandP.10).gifConsider hard-coded transformations.
Ff647691.checkbox(en-us,PandP.10).gifConsider element and attribute name lengths.
Ff647691.checkbox(en-us,PandP.10).gifConsider sharing the XmlNameTable.

Parsing XML

CheckDescription
Ff647691.checkbox(en-us,PandP.10).gifUse XmlTextReader to parse large XML documents.
Ff647691.checkbox(en-us,PandP.10).gifUse XmlValidatingReader for validation.
Ff647691.checkbox(en-us,PandP.10).gifConsider combining XmlReader and XmlDocument.
Ff647691.checkbox(en-us,PandP.10).gifOn the XmlReader, use the MoveToContent and Skip methods to skip unwanted items.

Validating XML

CheckDescription
Ff647691.checkbox(en-us,PandP.10).gifUse XmlValidatingReader.
Ff647691.checkbox(en-us,PandP.10).gifDo not validate the same document more than once.
Ff647691.checkbox(en-us,PandP.10).gifConsider caching the schema.

Writing XML

CheckDescription
Ff647691.checkbox(en-us,PandP.10).gifUse XmlTextWriter.

XPath Queries

CheckDescription
Ff647691.checkbox(en-us,PandP.10).gifUse XPathDocument to process XPath statements.
Ff647691.checkbox(en-us,PandP.10).gifAvoid the // operator by reducing the search scope.
Ff647691.checkbox(en-us,PandP.10).gifCompile both dynamic and static XPath expressions.

XSLT Processing

CheckDescription
Ff647691.checkbox(en-us,PandP.10).gifUse XPathDocument for faster XSLT transformations.
Ff647691.checkbox(en-us,PandP.10).gifConsider caching compiled style sheets.
Ff647691.checkbox(en-us,PandP.10).gifConsider splitting complex transformations into several stages.
Ff647691.checkbox(en-us,PandP.10).gifMinimize the size of the output document.
Ff647691.checkbox(en-us,PandP.10).gifWrite 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.

Show: