Re: how efficient is the canvas



Lauris Kaplinski wrote:
> 
> On Wed, 4 Aug 1999, Federico Mena Quintero wrote:
> 
> > >  How about lots of small, identical graphics?  It's my
> > >  understanding that GnomeCanvasImageItem copies the GdkImlibImage
> > >  into each new canvas item, as each one can be transformed
> > >  separately.
> >
> > No, the GnomeCanvasImage item will not copy the image.  It just keeps
> > a pointer to the original image, so multiple image items will share
> > it.
> >
> 
> 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


John



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