I have tried using the latest nightly build, however I am still
experiencing the same problem. I think what I am looking for most is a
clarification as to how the SAX parser is working.
I expect the memory usage to fluctuate as the document is parsed such
that memory gets allocated when an element is encountered, but once that
element has been handled by the ContentHandler, shouldn't the memory be
freed? If this were happening, the memory should rise and fall
continuously as the program executes. I have ported my work to Java,
and used Xerces-J and this seems to be happening just fine, which would
indicate that the allocated objects are garbage collected once the
element has been finished with. However, in Xerces-C++ the memory
continues to rise throughout the entire parsing process, and it is not
freed until I actually delete the parser reference which I have obtained
from the XMLReaderFactory (by calling createXMLReader).
What could be causing this memory to just continue to build up? I have
debugged my application using BoundsChecker, and it does not seem that
there are any memory leaks within the Xerces platform once everything
has been completed (called PlatformUtils::Terminate()). Any advice on
this topic would be greatly appreciated.
Mark
-----Original Message-----
From: Tinny Ng [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 21, 2001 10:30 AM
To: [EMAIL PROTECTED]
Subject: Re: Memory usage of SAX2XMLReader
This sounds similar to bugzilla bug 1329 which is now fixed in the
nightly
build http://xml.apache.org/dist/xerces-c/nightly/.
Tinny
Mark Northcott wrote:
> I am working on a project that is making use of the SAX2XMLReader to
> parse XML documents, and I am noticing that the parser is consuming a
> large amount of memory, which steadily increases approximately 200K
per
> sec. This is a problem for me because the product is expected to
parse
> very large data sources.
>
> I thought that SAX avoided this type of memory consumption since it is
> event driven and simply notifies my custom ContentHandler as each type
> of XML tag is encountered. Is there something I am missing here?
> Should SAX2XMLReader really be using this much memory? For example,
> while parsing an ~45M XML document, the memory usage rose to ~14M...
> this is not good because the program is expected to possibly handle
> documents that are several hundred megs large.
>
> ---------------------------------------------------------------------
> 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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]