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 03:05:57 -0800
User-agent: Mutt/1.5.23 (2014-03-12)

On Sun, Dec 13, 2015 at 11:45:42AM +0100, John Darrington wrote:
> On Sat, Dec 12, 2015 at 06:29:56PM -0800, Ben Pfaff wrote:
>      
>      I spent a little time this morning (I'm in Pune, India at the moment)
>      going through the Git commits on the pspp-sheet-view code, to refresh my
>      memory on why I built it to begin with.  I didn't choose to do it
>      lightly and if it was just a matter of using the fixed-row-height mode I
>      certainly would have not bothered.
>      
>      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.

GtkTreeView is also slow with a large number of variables (hundreds or
more), mostly because it instantiates a widget for every column.
PsppSheetView has changes that help with that a great deal too, by
lazily instantiating widgets only when they become visible, but it
wasn't the initial motivation for the effort.

Note that if PSPPIRE is really bad with either lots of variables or lots
of cases, then any data set with a lot of one of those is just one
"FLIP" command away from having a lot of the other!  That's one of the
reasons that I decided that large numbers of variables were important
too.

>      (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?

Another path I considered was to use a GTK+ library for viewing a
database.  I think that the options didn't seem very good at the time.
Looking at http://www.gnome-db.org/, it might be worth a shot.  I guess
the first step would be to write a libgda provider for PSPP, then one
could use the GdauiGrid (GdauiRawGrid?) widget to edit the data.



reply via email to

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