pspp-dev
[Top][All Lists]
Advanced

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

Re: libgda-ui


From: Ben Pfaff
Subject: Re: libgda-ui
Date: Sat, 26 Mar 2011 09:48:59 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Fetching and caching isn't a problem.  That is trivial, as you
say.

The problem is that, if you have a GtkTreeView with 1e9 rows,
then GtkTreeView will iterate over every one of them when you
create it, even if you turn on all of its "fixed height" and
"fixed column width" options.  Even if the body of the loop is
empty, that's too expensive.  (And in fact it's not empty:
GtkTreeView allocates and populates some memory for every row.)

libgda-ui solves this problem by only having a small block of
rows (maybe a few hundred) in the GtkTreeView at a time and
transparently swapping in a new set of rows as the user scrolls
through.  This is less trivial, though certainly we could do
something similar.

John Darrington <address@hidden> writes:

> Perhaps I'm being very naive, but wouldn't it be easy to write
> GtkTreeModel interface which caches rows that it has fetched?
>
> On Thu, Mar 24, 2011 at 07:37:02AM -0700, Ben Pfaff wrote:
>      The look is identical, because in fact it is a GtkTreeView.  The
>      reason that it would solve problems is that it fetches blocks of
>      rows, a few at a time, transparently, from a larger database,
>      which solves the performance problem with very large treeviews.

-- 
Ben Pfaff 
http://benpfaff.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]