Re: GtkTreeView with huge amount of rows; dynamic data source?



On Thu, Jan 13, 2005 at 02:05:38PM +0100, Gus Koppel wrote:
I'd like to have a list- or treeview-like representation of the contents
(rows) of a database. There can easily be tens of thousands of records
to be browsable in a list. Not only filtered parts of the table should
be listed, but also entire tables, unfiltered, should be browsable.

Preparing a GtkListStore (or even GtkTreeStore) in memory and prefill it
with, say, 100 000 entries doesn't seem to be the right way to me.
Besides the unacceptable memory consumption it would take a significant
amount of time to get the table entirely read in and the list prepared.

So I'm looking for a more dynamic way. My data source (database) is
capable of delivering arbitrary rows, in random access manner. My
concept is to dynamically read and display only small parts of the
database table, as the user scrolls to see them.

Plase see my post to gtk-list (for a database, one should do
some read-ahead instead of fetching rows one by one, but the
method is the same)

  http://mail.gnome.org/archives/gtk-list/2004-December/msg00217.html

It seems to work in practice, but no one answered my
question whether it's the Right Thing and whether it can be
expected to work in future Gtk+ versions. No one knows, or
no one cares...

However, 100k is still too much, so you probably need
a custom model (100k is also too much GUI-wise, I can't
imagine how can someone comfortably browse a list with 100k
items) that don't even need placeholder rows.

Yeti


--
Dynamic IP address is not a crime.



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