[gcompris-devel] Performance issues

Bruno Coudoin bruno.coudoin at free.fr
Tue Oct 9 17:12:09 UTC 2007


Le mardi 09 octobre 2007 à 17:52 +0300, Terje Bergström a écrit :
> On Tuesday 09 October 2007 02:20:37 Bruno Coudoin wrote:
> > To confirm the resizing of a large image is the root cause, can you try
> > to remove the display of help_bg.png in gcompris_confirm.c.
> 
> That's right, when I remove loading the background pixmap, the three second 
> lag is gone! It took me a while to remove all the debug statements. :-)

We know the root cause now but the solution is not obvious.

> The size of the screen is 800x480, so I run gcompris in 640x480 mode. Is there 
> a list of pictures that I could resize during package build time to make 
> loading them faster?

Even if you resize the images at build time, it won't solve the problem.
It will even get worse. Let's take an example, you have an image that is
400x300. When GCompris is run at 800x600, its native resolution, there
are no resize to do. When you run GCompris in a smaller or bigger
windows, the canvas will rescale the image accordingly, whatever the
original image size.

So if you rescale it upfront with a 0.5 ratio, and then display GCompris
in a window at 0.5 ratio, the resulting image will be at 0.25 instead of
0.5.

The only clean solution if to add svg support to the gnome canvas pixbuf
and use svg rescaling instead of pixbuf rescaling.

-- 
Bruno Coudoin
http://gcompris.net Free educational software for kids
http://toulibre.org Logiciel Libre à Toulouse





More information about the Gcompris-devel mailing list