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 Herb Chong <he...@us.ibm.com> on 2001/01/30 22:39:43 UTC

memory leaks?

i process a 1MB input XML document and find that the parser uses about 30MB
of memory over and beyond the space needed to hold the document in UTF-16
that i maintain and other such overhead. why does it take so much memory?
the XML documents that i intend to process are more than 50MB in size (they
really are compound documents consisting of tens of thousands of smaller
documents.). i really don't want to chop up my input files into smaller
pieces if i can help it because of the adminstrative overhead it would
impose.

Herb.....


Re: memory leaks?

Posted by Dean Roddey <dr...@charmedquark.com>.
The DOM is not a format intended for minimal size, its intended for maximum
flexibility. So it can make for pretty large files if you have lots of
elements, attributes, small chunks of text, etc...  If you took a file of
the same size that was mostly text, such as book in DOM form, it would
probably end up a lot smaller in memory. There is a good bit of housekeeping
stuff in each node in the DOM, to support all of the stuff it has to do.

--------------------------
Dean Roddey
The CIDLib C++ Frameworks
Charmed Quark Software
droddey@charmedquark.com
http://www.charmedquark.com

"We're gonna need a bigger boat"


----- Original Message -----
From: "Herb Chong" <he...@us.ibm.com>
To: <Xe...@xml.apache.org>
Sent: Tuesday, January 30, 2001 1:39 PM
Subject: memory leaks?


> i process a 1MB input XML document and find that the parser uses about
30MB
> of memory over and beyond the space needed to hold the document in UTF-16
> that i maintain and other such overhead. why does it take so much memory?
> the XML documents that i intend to process are more than 50MB in size
(they
> really are compound documents consisting of tens of thousands of smaller
> documents.). i really don't want to chop up my input files into smaller
> pieces if i can help it because of the adminstrative overhead it would
> impose.
>
> Herb.....
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>