Hi, We used to use Xerces-c 3.1.4 before migrating to 3.2.2 recently. We found 3.2.2 is slower than 3.1.4 when processing a XML file with around 13,000 simple nodes.
On Windows, I wrote a performance testing program to test two different ways of XML processing. One is based on DOMNode::getNextSibling(in function cacheAll_getNextSibling), another one is based on DOMNodeList::item(cacheAll_GetItem). There are two projects test these two functions. Project TestXMLPerformance uses Xerces-c 3.2.2. TestXMLPerformance.Xerces3.1 uses Xerces-c 3.1.4. For cacheAll_GetItem, xerces 3.2.2 based project needs 8 seconds to finish, however 3.1.4 based project only needs about 2.5. DOMNodeList::item consume CPU time very high in both 3.1.4 and 3.2.2. But the newer version is worse. Large part of CPU time are consumed by memory allocation and copy in _RTDynamicCast. In the stack trace, AnsXML is the wrapper of Xerces and Xalan. My questions: 1. Is 3.2.2 supposed to be slower than 3.1.4, because it has more features and security enhancement? 2. Are the switches used in the configuration and build made new library slower. 3.1.4 have .sln & .vcxproj came with the source code. So we used Visual Studio to build the library. For 3.2.2, there were no Visual Studio solution or project files provided. So we used cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_INSTALL_PREFIX={PathToXercesInstall} -Dxmlch-type=wchar_t -S {PathToXercesSource} to configure the project. Then used cmake --build . --config Release ctest -V -C Release -j 4 cmake --build . --config Release --target install to build and install. Is it possible -Dxmlch-type=wchar_t made the library slow down. 3. Is it possible to improve the performance of 3.2.2 through different build switches or options? Thanks! -- Qihong Wang Senior Software Developer ANSYS, Inc. www.ansys.com Southpointe 2600 ANSYS Drive Canonsburg, PA 15317-9565 Phone:724-820-3966 Fax:724-820-3816 E-Mail: qihong.w...@ansys.com