pspp-dev
[Top][All Lists]
Advanced

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

Re: gtk3: Replaced PsppSheetView with GtkTreeView for the variables wind


From: Ben Pfaff
Subject: Re: gtk3: Replaced PsppSheetView with GtkTreeView for the variables window
Date: Sun, 13 Dec 2015 04:25:21 -0800
User-agent: Mutt/1.5.23 (2014-03-12)

On Sun, Dec 13, 2015 at 01:19:05PM +0100, Friedrich Beckmann wrote:
> Am 13.12.2015 um 11:45 schrieb John Darrington <address@hidden>:
> > On Sat, Dec 12, 2015 at 06:29:56PM -0800, Ben Pfaff wrote:
> >     Looking at the commits, the biggest reason that I built PsppSheetView is
> >     that GtkTreeView uses O(n) memory (and therefore time as well) for an
> >     n-row treeview.  This is true even when it has fixed-height rows,
> >     because it maintains a per-row red-black tree that has one node per row.
> > 
> > It is strange then that Friedrich's and my experiments with many variables 
> > but few cases,
> > did not bear this out - there must be some other factor dominating.
> > 
> >     (It is pretty much necessary to have some kind of data structure because
> >     of the ability to have a tree rather than just a list.)
> > 
> > This is a shame, because of course we don't need the tree in our 
> > application.
> > 
> > Our current PsppSheetView was forked from GtkTreeView in Gtk2.x
> > 
> > I wonder if we shouldn't look at what is in Gtk3 to see if it helps us at 
> > all?
> 
> My experiments also show more a dependency on the number of columns and not
> the number of rows. I did 100000 cases and 50 variables and that is o.k.

Did you just wait for the treeview to initially show, or did you try to
scroll to the end?  My recollection is that the first screenful showed
up quickly but scrolling was unusably slow, with enough cases.

> The treeview is o.k. for the more or less visible range. Is it maybe
> possible to set the number of rows and columns in the treeview just
> depending on the visible area plus some margin? Then put the treeview
> as a widget on a large canvas which represents the total data? The
> canvas would be scrollable and the position of treeview on the canvas
> is changed such that is always visible, but the data that it displays
> is changed according to scrolling position.

It's worth experimenting.  I thought about this kind of approach before
implementing PsppSheetView, but I did not try to implement it myself.



reply via email to

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