Fri 24 Jan 2014 07:03:06 PM UTC, original submission:
I've started the work needed to add C++ support to wrappers-generator, discovering that XML_TREE is very slow when parsing the output of gccxml when it actually contains the description of C++ source code.
I tried to parse Qt4 sources creating a gccxml file with
gccxml -I /usr/include/qt4/ /usr/include/qt4/QtGui/QtGui -o qt4.gccxml
I do acknoledge that it's not the easiest C++ library to start with, expecially when recounting that the XML description of QtGui is 12 Mb...
Parsing the 1,3Mb description of Gobject is almost istantaneuous on a "recent" machine, while XMLTREE is parsing that qt4.gccxml after two full hours of runtime.
You may see it in action in tag
https://github.com/tybor/Liberty/tree/xml_tree_is_slow
I suspect this low performance is caused by XML entities ("<"), since C++ templates like QList<QAbstractButton> is translated into XML like this:
<Class id="_1048" name="Qlist<QAbstractButton>" ...
In fact there are more than 9 thousands "<" in that qt4.gccxml while only one in gobject.gccxml (as produced by the makefile in wrappers).
I'm sorry I haven't been able to trace it, I'll do ASAP.
|