[xsd-users] parsing/serialization performance
Boris Kolpackov
boris at codesynthesis.com
Thu Feb 5 12:28:57 EST 2009
Hi Brian,
I've CC'ed the xsd-users mailing list in case someone else ran or
will run into a similar problem.
Brian Kuschak <bkuschak at yahoo.com> writes:
> I have run into a major issue though, and that is performance on the
> embedded target (arm7). On the PC, things complete in ~ 50 msec.
> However, on the embedded target, it takes a very long 4.6 seconds
> to parse a small XML message and generate a short response.
> Unfortunately this is an order of magnitude too slow for me. I've
> determined that the great bulk of this time is taken by the
> construction of the top level object for parsing:
> auto_ptr<top> xml(top_(fname));
> and the construction of the top-level serializer object:
> top_(fout, xml, map);
Parsing and serialization functions do the following steps for each
document being parsed/serialized which can be moved out and done only
once during the application startup:
1. Initialization/termination of Xerces-C++
2. Construction of parser/serializer objects
3. For parsing, if XML Schema validation is enabled, loading of
the schema(s).
The 'performance' example in the examples/cxx/tree/ directory
shows how to do all this. For more information on how to parse
from std::istream and serialize to std::ostream see the C++/Tree
Mapping FAQ, Q2.4 and Q3.2:
http://wiki.codesynthesis.com/Tree/FAQ
Boris
More information about the xsd-users
mailing list