Re: efficient use of canvas lines



On Sun, 15 Jul 2001 11:25:25 -0400
Paul Davis <pbd op net> wrote:

[ snip ]

> Even with a regular sized window, this implies hundreds of
> GtkCanvasItems to represent the waveform. I am also not even sure how
> to manage the fact that the actual number may be much larger, since
> the widget/canvas item may extend off screen - one of the whole points
> of the canvas is to be able to forget about this kind of thing. the
> problem is the waveform display might be of an enormous wavefile (its
> not atypical to be dealing with files in the GB range), and its
> clearly absurd to create millions of GtkCanvasItems to represent this.
> 
> so, i'd like some advice about what to do here.

[ snip ]

I don't have any suggestions about what to do, but I wouldn't mind hearing
what some others approaches to dealing with large amounts of data are
(Or moving the discussion somewhere more appropriate)

As a GIS (mapping) company, we often deal with huge datasets, and
increadibly complex data (It's not unheard of to have polygons with 10's
of thousands of points, and many, many islands).
I briefly looked at the [Gtk|Gnome]Canvas, but once I realized that it
maintains everything in memory, I realized that we wouldn't be able to use
it as a solution.
[ "Repeat after me - The user always has more data than memory..." ]

It's a similar case with the gtkpixbuf:  I tried using it once on a
relatively small arial photo (50M).  After it crashed X and hard-locked
the machine, I didn't try that again... :-(
[ FYI - +200M images aren't out of the realm of possibility... ]

So, we're generally not using any of this clever, advanced GTK stuff, and
are manually calling gdk_draw_lines(), gdk_draw_rgb_image(), etc. on a
drawawble ourselves.  (Now I'm trying to figure out how to print what
we're drawing... Any suggestions?)

What are others doing, when dealing with large amounts of data?
Ian




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