Re: xml.xmldocument.load does it load document to memory?
From: Tomas Restrepo \(MVP\) (tomasr_at_mvps.org)
Date: 03/05/04
- Next message: Joe Hanna: "Re: Network Connection Event Listener"
- Previous message: Jerry III: "Re: Number of handles growing when using threads"
- In reply to: Created by: X: "xml.xmldocument.load does it load document to memory?"
- Next in thread: Created by: X: "Re: xml.xmldocument.load does it load document to memory?"
- Reply: Created by: X: "Re: xml.xmldocument.load does it load document to memory?"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 5 Mar 2004 18:26:03 -0500
> I am making a simple app that groups files together by storing them into
an xml document. But here is my concern. The xml file that is being loaded
could be a gigabyte in size or it could just be 100k. So my question is that
if I use the xml.xmldocument.load method does the data in that document get
loaded into memory or does it stay on disk until you navigate down the nodes
hiarchy?
It gets loaded into memory COMPLETE in an in-memory tree representation, so
it's not suitable to handling very large files unless you have a LOT of
memory (this is not specifically a .NET problem, it is an issue with how the
DOM is supposed to work in general).
If you want your processing to be much more scalable, use the XmlReader
derived classes instead of loading it into the DOM (granted, it means more
work and will imply you can't do certain things... like XSLT
transformations)
-- Tomas Restrepo tomasr@mvps.org
- Next message: Joe Hanna: "Re: Network Connection Event Listener"
- Previous message: Jerry III: "Re: Number of handles growing when using threads"
- In reply to: Created by: X: "xml.xmldocument.load does it load document to memory?"
- Next in thread: Created by: X: "Re: xml.xmldocument.load does it load document to memory?"
- Reply: Created by: X: "Re: xml.xmldocument.load does it load document to memory?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|