Libxml2

From Apache OpenOffice Wiki
Jump to: navigation, search

I created an uno compenent, implementing the com.sun.star.xml.sax.Parser service using libxml2.

I wanted to do a life comparision on xml load performance between the expat parser and the libxml2 parser in a running OOo. This so far does not work for all documents. I found a problem when during xml loading the configmgr is triggered and has to do some xml parsing on its own. He then also uses libxml2 for xml parsing in the same thread, causing a crash in the libxml2 implementation.

If someone find out how this crash can be resolved please note here.

Tests in writer showed nearly identical performance between expat and libxml2.

You can find the source for this component here. To build, just get a copy of the sax modul, extract the libxmlwrap directory to sax/source and do a dmake in sax/source/libxmlwrap. This creates a libxml library that you must copy to your office/program directory. Inside the office/program directory register the library. (f.e. under windows you can write regcomp -register -r services.rdb -clibxml680.dll). You can revert the changes by registering the sax.uno library again. This component only implements com.sun.star.xml.sax.Parser, so export is still be done over expat.

Personal tools