[cairo] Re: SVG backend patch

Jody Goldberg jody at gnome.org
Wed Aug 3 09:34:47 PDT 2005


On Wed, Aug 03, 2005 at 04:16:51PM +0200, Pierre-Alain Joye wrote:
> On Wed, 3 Aug 2005 09:57:22 -0400
> Jody Goldberg <jody at gnome.org> wrote:
> 
> > There is certainly a case for using libxml when doing significant
> > xml work.  However, the DOM representation uses alot of memory.
> > If there is no need to walk the tree once generated it is not
> > terribly useful.  In Gnumeric we picked up a factor of 3-10 in
> > performance by moving to a more printf style of xml generation
> > using the routines in libgsf.  All we were doing was generating
> > alot of sequential xml, the memory allocation alone was about 4x
> > the internal datastructures.
> 
> Did yout try xmlwriter? and reader if you read some xml datas.

Neither existed when these tests were done.  We use sax for reading,
which isn't likely to perform worse than xmlreader.  I'd have to
look at xmlwriter implementation to find the performance
characterstics.  The libgsf interfaces are similar to xmlwriter.

I'm not advocating against a libxml dependency, just against the use
of DOM.



More information about the cairo mailing list