diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2025-05-02 07:42:02 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2025-05-02 07:42:02 +0200 |
commit | fc486627a4ecbae797fa6856d8a9204ea85f4db8 (patch) | |
tree | ff3dae4c0e5d980d8e2da4fc6256ae839269bbcd /xsd/examples/cxx/tree/performance/README | |
parent | 1c188393cd2e271ed2581471b601fb5960777fd8 (diff) | |
parent | ecba0bbd9947036dd82f16ab95252f8db445e149 (diff) |
Merge tag 'debian/4.0.0-10' into developdevelop
Bugfix release
Diffstat (limited to 'xsd/examples/cxx/tree/performance/README')
-rw-r--r-- | xsd/examples/cxx/tree/performance/README | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/xsd/examples/cxx/tree/performance/README b/xsd/examples/cxx/tree/performance/README new file mode 100644 index 0000000..cb79cc2 --- /dev/null +++ b/xsd/examples/cxx/tree/performance/README @@ -0,0 +1,58 @@ +This example measures the performance of parsing and serialization in +the C++/Tree mapping. It also shows how to structure your code to +achieve the maximum performance for these two operations. + +The example consists of the following files: + +test.xsd + XML Schema which describes the test vocabulary. + +test-50k.xml + Test XML document. + +gen.cxx + Program to generate a test document of desired size. + +time.hxx +time.cxx + Class definition that represents time. + +test.hxx +test.ixx +test.cxx + C++ types that represent the given vocabulary, a set of parsing + functions that convert XML documents to a tree-like in-memory object + model, and a set of serialization functions that convert the object + model back to XML. These are generated by the XSD compiler from + test.xsd. + +parsing.cxx + Parsing performance test. It first reads the entire document into + a memory buffer. It then creates a DOM parser and pre-parses and + caches the schema if validation is enabled. Finally, it runs the + performance measurement loop which on each iteration parses the + XML document from the in-memory buffer into DOM and then DOM to + the object model. + +serialization.cxx + Serialization performance test. It first parses the XML document + into the object model. It then creates a memory buffer into which + the document is serialized and a DOM serializer. Finally, it runs + the performance measurement loop which on each iteration serializes + the object model to DOM and DOM to XML. + +driver.cxx + Driver for the example. It first parses the command line arguments. + It then initializes the Xerces-C++ runtime and calls the parsing + and serialization tests described above. + +To run the example on a test XML document simply execute: + +$ ./driver test-50k.xml + +The -v option can be used to turn on validation in the underlying XML +parser (off by default). The -i option can be used to specify the +number of parsing and serialization iterations (1000 by default). For +example: + +$ ./driver -v -i 100 test-50k.xml |