[cairo] Very slow performance

Chris fltk at functionalfuture.com
Thu Dec 23 06:54:59 PST 2004


I have some fairly complex SVG artwork that I created.  I have noticed
that the performance of Cairo is quite a bit slower than some other svg
libraries.

My image has about 3500 paths and on my machine this image takes less
than a second to load and render in Inkscape (librsvg/libart based?).
Even Inkscape feels slow compared to commercial applications when
handling this file.

I made a simple test program that loads this file and renders it to an
image buffer in Cairo.  It takes over 30 seconds to do this.  That's
incredibly slow and makes me wonder about the usability of Cairo in
everyday applications.  

Would rendering to OpenGL or xlib be faster?  I'm planning on adding SVG
support to FLTK by using Cairo so even if those are faster that might
not help me as FLTK has it's own cross-platform drawing functions that I
will be using.

Where is the bottleneck?  Is libart just that much faster at doing the
rendering?

The source code for my simple test is here:
http://www.functionalfuture.com/radical/cairotest.c

The SVG image I'm using is here:
http://www.functionalfuture.com/radical/centi_unfinished.svg.gz

-- 
// Chris




More information about the cairo mailing list