[xsd-users] Tree streaming serialization

Boris Kolpackov boris at codesynthesis.com
Tue Feb 11 02:02:44 EST 2014


Hi Pavel,

Pavel Fiala <pavel.fiala at cern.ch> writes:

> I executed the streaming example with 1M and 10M position elements.
> The output file size is ~38 MB for 1M position elements and ~387 MB
> for 10M position elements, the memory consumption for 10M is
> basically 10 times 1M memory, plots are attached.

Thanks for testing this. I went through the Xerces-C++ DOM recycling
code and it should re-use released elements. I don't see anything
broken with that code off the top of my head.

Can you try the following: in serializer.cxx, in the create()
functions (two of them), right at the beginning add this line:

doc_.reset (dom_impl_.createDocument ());

This will reset the document for every node created which should
free all the memory allocated by the document.

Can you then check if this makes any difference for the memory
consumption?

Boris



More information about the xsd-users mailing list