[Sugar-devel] SVG performance

Jim Gettys jg at laptop.org
Mon Dec 8 20:16:10 EST 2008


On Mon, 2008-12-08 at 20:12 -0500, Bernie Innocenti wrote:
> Sascha Silbe wrote:
> > On Mon, Dec 08, 2008 at 07:51:54AM -0500, Walter Bender wrote:
> > 
> >> I think the solution may be as simple as going back to GIF files.
> > Please don't. Using vector graphics helps scaling Sugar to non-XO devices.
> 
> We had a quick look today, and it seems Gdk.PixBuf.new_from_file():
> 
> http://library.gnome.org/devel/gdk-pixbuf/stable/gdk-pixbuf-file-loading.html#gdk-pixbuf-new-from-file
> 
> 
> With some instrumentation, it was apparent that it takes a long time
> to render some SVG files.  One in particular took half a second on a
> laptop with a fast processor!  A visual inspection of the problem
> files reveals they mostly contain just a <path> with a few dozen
> points in it.

Youch...

> 
> It seems GDK supports SVG through a loader plugin.  Can we put the
> blame on librsvg for this slowness?  Are there alternative SVG
> renderers we could try?

IIRC, librsvg is it.

A bit more profiling to get through the tangled web of dependencies is
probably in order.
              - Jim

> 
-- 
Jim Gettys <jg at laptop.org>
One Laptop Per Child



More information about the Sugar-devel mailing list