Improving Canvas Performance

I'm working on a graphic-intensive application that uses GNOME
Canvas as its primary interface.  Right now, it's pretty small. 
A screenshot is here:

Obviously, I'm not doing much.  I have a few small PNG tiles
which I load into GdkImlibImage's.  When I add them to the
canvas, I simply pass the GdkImlibImage pointers to the canvas
items, for a total of 36 tiles, using two different images (plus
the penguins).

Unfortunately, it takes 3-5 seconds to load the canvas, for such
a small test map.  The real map will have the potential to grow
quite huge.  It does seem that the time is spent on the initial
expose.  I load all the graphics up front, and that's done in a
heartbeat.  The performance hit comes when the window is first
displayed.  Once the canvas is up, though, it runs fine.

[ Note that I'm embedding the canvas inside an MDI child.  I
don't think that would have any ill effects, but who knows? ]

Any thoughts or advice?  I don't mind a small wait, but it's
looking like any decent sized map is gonna take me 30 seconds to
a minute and beyond.  Hopefully, I'm just doing something stupid.


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