> We found out that an Element takes around 52 Bytes (Xerces V1.6 for
Linux).

Have you tried out our new DOM in the latest distribution?   We have
redesigned our DOM implementation in Xerces-C++ 2.0 for faster performance
and less memory footprint.
http://xml.apache.org/xerces-c/program-dom.html#Objectives has more details.

Tinny

----- Original Message -----
From: "Johannes Gutleber" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 14, 2003 12:04 PM
Subject: Xerces DOM memory footprint


> Hello,
>
> I've been using Xerces for quite some time in
> our project on a variety of Oses (Linux, Solaris, MacOS X, VxWorks)
> and we're all quite happy with it. So thanks first of all
> to all of you for providing a really stable/portable product!
>
> Recently we ran into the use case, that we have to
> generate DOM trees in memory for caching a large number
> of configuration values for hardware devices (the number nodes
> is in the range of 1.000.000). Unfortunately we've seen some
> considerable memory footprint in this case (ranging from 500MB
> to 1 GB). We digged into the Xerces code and used Insure++ to
> figure out, where the memory goes. We found out that
> an Element takes around 52 Bytes (Xerces V1.6 for Linux).
> Our initial guess that we  could save some memory by maybe adapting
> the DOMString allocation scheme did therefore not turn out to be fruitful.
>
> I wonder, if other users also have see some limitations in this
> aspect and how they addressed the problem (SAX doesn't really help
> out a lot, since we rely on the DOM structures in memory. A dirty
workaround
> for the time being would be to keep a textual XML representation in memory
> and SAX it, but that makes modification more difficult).
>
> Are any plans in the future to either
> create/dispose Nodes as they are needed/not needed or find
> a compacter representation in memory.
>
> Cheers
> Johannes Gutleber
> CERN
> European Organization for Nuclear Research
> 1211 Geneva 23, Switzerland
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to