pspp-dev
[Top][All Lists]
Advanced

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

Re: Bug #47090


From: John Darrington
Subject: Re: Bug #47090
Date: Thu, 25 Feb 2016 14:27:32 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

I fully agree that we should not spend a lot of effort on the existing sheet.

At the same time, especially considering the recent discussion on pspp-users, I
think we should be making a release asap.  The "efficient-sheet" is not going
to be ready for at least 3 months.  I don't think it sensible to wait that long.

My thinking is to resolve this outstanding criticical bug in a way which 
requires
minimal effort, make a release and then concentrate on the new efficient sheet.

J'


On Thu, Feb 25, 2016 at 10:02:28AM +0100, Friedrich Beckmann wrote:
     Hi John,
     
     > Am 24.02.2016 um 17:21 schrieb John Darrington <address@hidden>:
     > 
     > I think that once Bug #47090  and Bug #42086 have been fixed, so
     > long as no new issues have arisen, it will be time to make a new
     > release.
     > 
     
     Maybe it is an idea to first include your efficient sheet, before thinking 
about a new release. I still
     have the impression that pspp-sheet-view is lets say difficult in gtk3. 
See even from today:
     
     https://savannah.gnu.org/bugs/index.php?47251 
<https://savannah.gnu.org/bugs/index.php?47251>
     
     Thinking about a release means thinking about pspp-sheet-view and maybe 
that is wrong
     because it puts efforts in the wrong place.
     
     > Regarding Bug #47090:
     > 
     > In our current git HEAD operations on the sheet are of complexity
     > O(n^2) in the number of columns.  This means that operations on data,
     > when there are a large number of variables are unacceptably slow.
     > I have to wait longer than 5 minutes for an operation on 2500 variables
     > to complete (it is almost instantaneous without the GUI).
     > 
     > Ideally, these operations can be done with O(1) complexity, and that
     > is what happens with the "efficient-sheet" I have been working on.
     > However that is not going to be ready for public consumption in the
     > next few weeks.
     > 
     > In release 0.8.5 this operation was O(n) so I think we should look
     > for a short term solution which restores this behaviour.
     > 
     > I can see two possible solutions:
     > 
     > Solution 1:
     > 
     > Revert commit 8298a4c6e326a39e204ca58d686497758333a102.
     > 
     > This commit by Friedrich appears to have undone an earlier optimisation.
     > Friedrich can be elaborate on the bug you noticed which prompted you
     > to make this commit?  Maybe there is another solution?
     
     From the commit message:
     
     <msg>
     fixed initial show of names in header window. Variable names only showed 
up after switching between variable and data window. The reason is that the 
buttons of the columns are not created. This is due to interdependency between 
the size allocation and the button creation. I removed the need_button 
mechanism.
     </msg>
     
     I remember the problem about the window update. But I would rather put my 
efforts into the efficient sheet.
     
     And below: Maybe it works. But it means thinking about sheet-view.
     
     > Solution 2:
     > 
     > The patch below fixes the time complexity, and so far as I can see
     > introduces no adverse effects.  However I haven't done any very
     > thorough testing.
     > 
     > It removes a loop which calls _pspp_sheet_view_column_cell_set_dirty
     > on all the columns.  Note that the function 
_pspp_sheet_view_column_cell_set_dirty
     > sets a flag:
     >  tree_column->dirty = TRUE;
     > but there is nothing in our code which reads this flag or unsets it.
     > Perhaps it is here only for historical reasons?
     > 
     > 
     > 
     > 
     > 
     > 
     > 
     > From 54d20e902513f7a890c727cc45d31dceb64679ed Mon Sep 17 00:00:00 2001
     > From: John Darrington <address@hidden>
     > Date: Wed, 24 Feb 2016 09:21:36 +0100
     > Subject: [PATCH] pspp-sheet-view.c: Remove inner loop from column 
insertion
     > and removal operations
     > 
     > This appears to do no harm and moves the complexity from O(n^2) to O(n).
     > 
     > 
     > From 54d20e902513f7a890c727cc45d31dceb64679ed Mon Sep 17 00:00:00 2001
     > From: John Darrington <address@hidden>
     > Date: Wed, 24 Feb 2016 09:21:36 +0100
     > Subject: [PATCH] pspp-sheet-view.c: Remove inner loop from column 
insertion
     > and removal operations
     > 
     > This appears to do no harm and moves the complexity from O(n^2) to O(n).
     > ---
     > src/ui/gui/pspp-sheet-view.c | 14 --------------
     > 1 file changed, 14 deletions(-)
     > 
     > diff --git a/src/ui/gui/pspp-sheet-view.c b/src/ui/gui/pspp-sheet-view.c
     > index fe70504..7ff7569 100644
     > --- a/src/ui/gui/pspp-sheet-view.c
     > +++ b/src/ui/gui/pspp-sheet-view.c
     > @@ -8927,14 +8927,6 @@ pspp_sheet_view_remove_column (PsppSheetView      
 *tree_view,
     >       GList *list;
     > 
     >       _pspp_sheet_view_column_unrealize_button (column);
     > -      for (list = tree_view->priv->columns; list; list = list->next)
     > -        {
     > -          PsppSheetViewColumn *tmp_column;
     > -
     > -          tmp_column = PSPP_SHEET_VIEW_COLUMN (list->data);
     > -          if (tmp_column->visible)
     > -            _pspp_sheet_view_column_cell_set_dirty (tmp_column);
     > -        }
     > 
     >       if (tree_view->priv->n_columns == 0 &&
     >    pspp_sheet_view_get_headers_visible (tree_view) &&
     > @@ -8991,12 +8983,6 @@ pspp_sheet_view_insert_column (PsppSheetView      
 *tree_view,
     > 
     >       _pspp_sheet_view_column_realize_button (column);
     > 
     > -      for (list = tree_view->priv->columns; list; list = list->next)
     > -        {
     > -          column = PSPP_SHEET_VIEW_COLUMN (list->data);
     > -          if (column->visible)
     > -            _pspp_sheet_view_column_cell_set_dirty (column);
     > -        }
     >       gtk_widget_queue_resize (GTK_WIDGET (tree_view));
     >     }
     > 
     > --
     > 2.1.4
     > 
     
     
     
     
     



-- 
Avoid eavesdropping.  Send strong encryted email.
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://sks-keyservers.net or any PGP keyserver for public key.

Attachment: signature.asc
Description: Digital signature


reply via email to

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