Parsing of a 40MB xml string leads to use 500MB RAM memory
----------------------------------------------------------
Key: XERCESC-1647
URL: http://issues.apache.org/jira/browse/XERCESC-1647
Project: Xerces-C++
Issue Type: Improvement
Components: DOM
Affects Versions: 2.7.0
Environment: Windows 2000/Windows XP; Visual C++6
Reporter: Cédric Dutoit
When I parse a 40MB xml string using a dombuilder and a
membufinputsource/wrapper4inputsource, the parser is taking 500MB of RAM.
The normal behaviour would be to use around 40MB of RAM only.
Here is an extract of the source code I'm using :
string xml(...);
DOMBuilder* parser = ((XML_NQ
DOMImplementationLS*)impl)->createDOMBuilder(XML_NQ
DOMImplementationLS::MODE_SYNCHRONOUS, 0);
parser->setFeature(XML_NQ XMLUni::fgDOMNamespaces, false);
parser->setFeature(XML_NQ XMLUni::fgXercesSchema, false);
parser->setFeature(XML_NQ XMLUni::fgXercesSchemaFullChecking, false);
MemBufInputSource source(reinterpret_cast<const XMLByte*>(xml.c_str()),
xml.size(), "InputSource");
Wrapper4InputSource wis(&source, false);
doc = parser->parse(wis);
Or perhaps there is another way of parsing xml string using DOM ? I'd like to
have mode_asynchronous, but I've seen that this is not yet supported by
Xerces-c, unfortunately...
Cédric D.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]