Hi John,

> Am 24.02.2016 um 17:21 schrieb John Darrington <[email protected]>:
> 
> 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 <[email protected]>
> 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 <[email protected]>
> 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
> 





Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

_______________________________________________
pspp-dev mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/pspp-dev

Reply via email to