[xsd-users] Some performance problems with XSD.

Boris Kolpackov boris at codesynthesis.com
Thu Aug 10 06:17:47 EDT 2006


Hi Dmitry,

Dmitry Trifilov <dmitry.trifilov at 121media.com> writes:

> I have some performance problems with code generated by XSD.
>
> Code generated by XSD parses my XML file during 35 - 40 seconds, this
> time is too long for my task.
> My XML file have one feature: It contains element "<words_sequence>"
> which contains about 6000 subelements "<Word>".

Thanks for providing the test case. I investigated the problem and
created a patch[1]. Simply replace the files in your copy of libxsd
with the ones supplied. The changes are compatible with 2.2.0. They
will most likely work with 2.1.0, though there is no guarantee.

On my box the time when from about 160s to 0.12s. For those interested,
the Xerces-C++ DOMNodeList implementation has O(n) access time. Replacing
it with getFirstChild/getNextSibling speeds things up significantly.

Thanks for reporting this!

[1] http://codesynthesis.com/~boris/tmp/xsd-2.2.0-performance-patch.tar.gz

hth,
-boris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 652 bytes
Desc: Digital signature
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20060810/d0567164/attachment.pgp


More information about the xsd-users mailing list