xmlreader is fast XML pull parser ?
michael.meeks at collabora.com
Tue May 10 13:38:34 UTC 2016
On Tue, 2016-05-10 at 13:49 +0200, Eike Rathke wrote:
> On Monday, 2016-05-09 11:38:25 +0800, LGH710681042 at gmail.com wrote:
> > I know xmlreader is currently used by configmgr, when we start up LO, configmgr
> > will parse *.xcd files in /share/registry directory. It will takes several seconds.
> > so i guess that xmlreader is not real fast, i want to know how can we optimize the speed of parsing files?
> Run with callgrind and investigate with kcachegrind where the actual
> bottle necks are.
Having done this in the past (and make sure you don't use a dbgutil
build - since this makes xmlreader very much slower than other pieces
due to the nice assertions in it) - there are a few obvious things:
* configmgr XML uses multiple namespaces
+ this makes the XML bigger and much slower to parse
+ supposedly this helps with DTDs (or something) but ...
* configmgr XML parsing is single threaded
+ it would be far more ideal to parse in multiple
threads, even phones have spare un-used threads these
+ however this needs some care with code-structure and
Beyond that, I've spent a little while reading the code there, side by
side with the profile and looking for obvious sillies without great
michael.meeks at collabora.com <><, Pseudo Engineer, itinerant idiot
More information about the LibreOffice