[Gtk-sharp-list] Data-Bound TreeView
ruzyczka at versanet.de
Tue Jan 8 10:24:55 EST 2008
Am Sonntag, 6. Januar 2008 19:49 schrieb Christian Hergert:
> First of all, I went the route of writing a custom GtkTreeModel. This
> way I had full control of tree iteration. You will probably want to
> do the same. Especially since this allows lazy loading.
The reason why I used a pre-sorted query is that the sorting function for the
tree view nodes is then executed in the RDBMS, which in turn lowers some CPU
burden on the client side. The drawback of my solution, of course, is that
it's no longer DBMS-independent because of the stored procedure. :-(
> For example: For the iter data, you could store the rows offset. In
> PostgreSQL and SQLite, using the row OID works great as it is the
> fastest way to access any record. However, using a system that allows
> you to determine the next rows Iter data without a new query is
> probably a good idea. If I remember correctly, I got my best
> performance by mixing the two ideas; Batching queries to get the next
> 10 rows OIDs.
DANGER: The newest PostgreSQL releases assign OIDs to individual rows only
when you request it in the CREATE TABLE command.
> You also may want a tunable cache to lower the number of queries. I
> used a LRU which worked pretty decently . Just remember to expire
> values on updates.
That's a good thing as you never know what the LAN performance of your
customers is. :-/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20080108/ff1dc26a/attachment-0001.bin
More information about the Gtk-sharp-list