[gnome-db] Tree-structured data



Hello.

IIUC the API is in a changing state.
I'd propose to consider aupport for a tree model, not only for list
model. I've already considered the problems, and it seems they can be
solved in a general way using a "find_parent" callback that returns some
kind of pointer to the parent node of the "to be appended" row. Even
better could be support for "load on demand", so that data is actually
read from db only when needed (for example when a branch is expanded,
via a callback that receives a reference to the parent node). I've
already done something similar in a program I'm working on, so some code
is already available (even if it needs to be adapted, since I'm using
some direct calls to the DB).
When you have something like 100k rows, using a tree is the only way to
load the data in a reasonable time. I've done some testing, and filling
a list (well, actually DISPLAYING it on Gtk+2) with 10000 rows took
quite a long time (hours), while splitting all the data in a tree with
about 1000 elements per node took just seconds... [could retrieve actual
figures, if needed]

Waiting for feedback...

BYtE,
 Diego.



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