expat Memory Footprint?

"Steve Vernon" <[email protected]>
Newsgroups gmane.text.xml.expat.general
Message-ID <005d01c78a1c$9c4603a0$6402a8c0@dell4700>
What is the memory footprint for expat?  How does it grow with the input document?

I would like to know what is the starting size, then what "variables" it depends upon and what is the factor of expansion for each such variable.  (Of course, I am talking about non-static data size - compiled code size is not likely to be an issue.)

For example, I assume that for parsing that we need to at minimum keep track of all the open start tags (ones that so far have seen no corresponding end tags) and that these are stored in XML_Chars.  But perhaps there is other overhead per open start tag.  And, of course, there could be information stored for DTD items.

The best estimate of the size would be appreciated.  At most a factor of 2 over the reality.  It seems that XML_MIN_SIZE affects some size, but am not certain that it affects data size - again, we won't likely have issues with code size.  We will likely want to use most features of expat, so we don't want to turn off features.

We have a constrained memory environment and will need to do many parallel parses.  With enough parallelism the total memory footprint could get prohibitive if expat is not frugal.  Essentially every byte may count.

Thanks in advance.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.