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 <[email protected]> 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 _______________________________________________ pspp-dev mailing list [email protected] http://lists.gnu.org/mailman/listinfo/pspp-dev
