PRB: ISAXXMLReader::parseURL Consumes Large Amount of Memory Over HTTP (291844)
The information in this article applies to:
- Microsoft XML 3.0
- Microsoft XML 3.0 SP1
- Microsoft XML 4.0
This article was previously published under Q291844 SYMPTOMS
When you use code such as the following, note that the parseURL method of the SAXXMLReader object consumes an unexpectedly large amount of memory when parsing a large XML file over HTTP:
Set saxReader = CreateObject("Msxml2.SAXXMLReader.3.0")
saxReader.putFeature "server-http-request", true
saxReader.parseURL "http://localhost/big.xml"
You expect that the parseURL method would not consume much more memory than the actual size of the XML file.
CAUSE
The current implementation of the WinHttpRequest component that is used by the ServerXMLHTTP object does not support "pull" semantics for retrieving the response data; that is, the WinHTTPRequest does not support fetching the response off the wire in chunks. As a result, the response data gets double buffered in the WinHttpRequest component.
The component itself maintains one copy internally and then makes a second copy to make the responseText, responseBody, and responseStream properties available for use with scripting languages. The double buffering may lead to large memory footprints when using the Simple API for XML (SAX) or Document Object Model (DOM) components to process large XML files over HTTP.
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
Memory usage is reduced when you use Microsoft XML version 3.0, Service Pack 1 or MSXML 4.0.
Modification Type: | Major | Last Reviewed: | 10/16/2002 |
---|
Keywords: | kbBug kbDSupport kbprb KB291844 kbAudDeveloper |
---|
|