You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Cédric Dutoit (JIRA)" <xe...@xml.apache.org> on 2006/11/13 15:06:37 UTC

[jira] Created: (XERCESC-1647) Parsing of a 40MB xml string leads to use 500MB RAM memory

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: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


[jira] Closed: (XERCESC-1647) Parsing of a 40MB xml string leads to use 500MB RAM memory

Posted by "Alberto Massari (JIRA)" <xe...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XERCESC-1647?page=all ]

Alberto Massari closed XERCESC-1647.
------------------------------------

    Resolution: Fixed

Please use the c-users mailing list to ask questions

> 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: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org