[xsd-users] XSD uses a lot of memory
Maxim Maslennikov
maxim.maslennikov at gmail.com
Mon Mar 16 17:39:57 EDT 2015
Hi Boris,
I used ‘persistence’ example modified it to parse and serialize xml with scheme described in test.xsd.
A root object saves all record object in std::vector as you can see in record.cpp.
I builded an executable file as:
clang -std=c++11 -O2 record.cpp main.cpp -lstudxml -o driver.
Next I generate a test xml file of 635k records by program gen from 'performance' example.
And run as:
./driver test-100m.xml > /dev/null.
The driver took about 142Mb memory according top output.
XSD example which I sent in previous mail took about 800Mb memory.
I again attached the files.
Thanks in advance,
Maxim
> On Mar 16, 2015, at 4:45 PM, Boris Kolpackov <boris at codesynthesis.com> wrote:
>
> Hi Maxim,
>
> Maxim Maslennikov <maxim.maslennikov at gmail.com> writes:
>
>> Enclosed are sources of the program based on libstudxml and xsd file.
>
> I don't see the source for the program based on libstudxml? If
> you are using the unmodified 'performance' example, then that
> implementation doesn't store a single bit of the object model
> in memory. In fact, the parser is configured to the limits not
> to store anything in memory. It would be hard to find a more
> obvious "apples to oranged" comparison.
>
> Boris
More information about the xsd-users
mailing list