Re: how efficient is the canvas

On Thu, Aug 05, 1999 at 09:08:29AM -0500, John R Sheets wrote:
> > On Wed, 4 Aug 1999, Lauris Kaplinski wrote:
> > 
> > But it creates separate pixmaps & masks, which make it still unefficient
> > for bunches of identical images.
> Thanks, Lauris, that's what I was referring to.  In my small test
> case, it takes 3-6 seconds to render 36 small icon-sized tiles. 
> A decent sized map will take 10-20 and more seconds to render,
> which is a bit harder to swallow.  Note, the delay is not during
> canvas item creation, but when it first tries to show the canvas.
> Of course, there might be a better way of doing what I'm doing. 
> As far as I know, I'm keeping it simple and straightforward.  I
> only create one GdkImlibImage per image.
> John

Hmm.  GnomeHack uses the gnome canvas to create its map out of
_lots_ of little images (3360 images at a time to be exact).  These 
images are tiled onto the canvas, and then a window which displays 
a subset of the whole map is displayed.  On my computer (a 433Mhz 
Celeron) it takes less than a second to render all of these 3360 
images and display them in the canvas.  

Gnomehack used to take a _really_ long time to render also.  Then
we fixed our code.  Based on the fact that GnomeHack can display all 
these tiles in a gnome canvas in well under a second, I think that 
your code could also use some improvement if it takes 6 seconds for
only 36 small images.  Please feel free to check out how GnomeHack 
does things.

in particular, the gnome-canvas stuff live in:


Erik B. Andersen   Web: 
--This message was written using 73% post-consumer electrons--

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]