[cairo] Re: SVG backend patch
jody at gnome.org
Wed Aug 3 06:57:22 PDT 2005
On Wed, Aug 03, 2005 at 02:29:26PM +0200, Amaury Jacquot wrote:
> Steve Chaplin wrote:
> >I don't think using libxml is essential, and it adds an extra dependency
> >to cairo.
> >>From skimming through the patch I can see it uses just a small number of
> >functions (xmlBufferCat, xmlBufferCreate, xmlNewChild, xmlSetProp,
> >xmlBufferContent, xmlBufferFree, xmlNewDoc, xmlNewNode)
> >Why not write you own versions of these functions and remove the
> >The PS/PDF backends seem to manage OK AFAIK without importing a PS/PDF
> >parsing library.
> You've been infected by the NIH virus...
> as everything and it's mother is already dependent on libxml, there is
> no point in bothering with reinventing the wheel for the nth time
> (creating tons of avoidable bugs & non standards compliant behavior in
> the process).
> This is similar to the situation in the kernel where there were at least
> 5 copies of libgzip each with a different patch level.
> bring on the dependance.
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
More information about the cairo