[gnumeric] GUI: Improve paste-to-large-area performance.



commit 108cecd1408d30f81d9eeb4d5307bec361f84ebb
Author: Morten Welinder <terra gnome org>
Date:   Thu Mar 29 14:03:00 2012 -0400

    GUI: Improve paste-to-large-area performance.

 ChangeLog    |    3 +++
 NEWS         |    1 +
 src/colrow.c |    5 +++++
 3 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 5383a5d..b45c925 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2012-03-29  Morten Welinder  <terra gnome org>
 
+	* src/colrow.c (colrow_autofit): Mark as unit for recalc.  (This
+	one hits for paste-to-large-area.)
+
 	* src/sheet.c (sheet_redraw_region): Revert to redrawing the whole
 	sheet if the region is too tall.
 
diff --git a/NEWS b/NEWS
index 3cb051e..df95f0f 100644
--- a/NEWS
+++ b/NEWS
@@ -50,6 +50,7 @@ Morten:
 	* Fix scrollbar/spinbutton load-from-.gnumeric.  [Part of #672716]
 	* New function COVARIANCE.S.
 	* Enable MATCH/VLOOKUP/HLOOKUP caches during redraw.
+	* Speed-up some operations on large areas.
 
 --------------------------------------------------------------------------
 Gnumeric 1.11.2
diff --git a/src/colrow.c b/src/colrow.c
index 8c861a3..4bb617e 100644
--- a/src/colrow.c
+++ b/src/colrow.c
@@ -817,7 +817,12 @@ colrow_autofit (Sheet *sheet, const GnmRange *range, gboolean is_cols,
 	if (sizes)
 		*sizes = g_slist_prepend (NULL, colrow_get_states (sheet, is_cols, a, b));
 
+	/* We potentially do a lot of recalcs as part of this, so make sure
+	   stuff that caches sub-computations see the whole thing instead
+	   of clearing between cells.  */
+	gnm_app_recalc_start ();
 	colrow_foreach (crs, a, b, handler, &data);
+	gnm_app_recalc_finish ();
 }
 
 void



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