[gnumeric] Redraw: make sure to enable caches between cells.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Redraw: make sure to enable caches between cells.
- Date: Wed, 28 Mar 2012 16:14:47 +0000 (UTC)
commit 7b7be0d5f4dabc417ac3193827c2f53925a51931
Author: Morten Welinder <terra gnome org>
Date: Wed Mar 28 12:13:45 2012 -0400
Redraw: make sure to enable caches between cells.
Redraw does jit-compuation for rendered values, so we need to make sure
the whole redraw is seen as one computation.
ChangeLog | 6 ++++++
NEWS | 1 +
src/sheet.c | 12 ++++++++++++
3 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index e2905b5..653915c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-03-28 Morten Welinder <terra gnome org>
+
+ * src/sheet.c (sheet_redraw_all, sheet_redraw_region): Mark whole
+ thing as one computation. Jit-computation of rendered values
+ would otherwise discard caches between each cell.
+
2012-03-26 Andreas J. Guelzow <aguelzow pyrshep ca>
* src/expr.c (do_expr_as_string): use new convs->output.boolean
diff --git a/NEWS b/NEWS
index 7850306..3cb051e 100644
--- a/NEWS
+++ b/NEWS
@@ -49,6 +49,7 @@ Morten:
* Improve test suite for ods.
* Fix scrollbar/spinbutton load-from-.gnumeric. [Part of #672716]
* New function COVARIANCE.S.
+ * Enable MATCH/VLOOKUP/HLOOKUP caches during redraw.
--------------------------------------------------------------------------
Gnumeric 1.11.2
diff --git a/src/sheet.c b/src/sheet.c
index 990dcc2..ab2eaea 100644
--- a/src/sheet.c
+++ b/src/sheet.c
@@ -1380,8 +1380,13 @@ sheet_new (Workbook *wb, char const *name, int columns, int rows)
void
sheet_redraw_all (Sheet const *sheet, gboolean headers)
{
+ /* We potentially do a lot of recalcs as part of this, so make sure
+ stuff that cachings sub-computations see the whole thing instead
+ of clearing between cells. */
+ gnm_app_recalc_start ();
SHEET_FOREACH_CONTROL (sheet, view, control,
sc_redraw_all (control, headers););
+ gnm_app_recalc_finish ();
}
static GnmValue *
@@ -2942,10 +2947,17 @@ sheet_redraw_region (Sheet const *sheet,
g_return_if_fail (IS_SHEET (sheet));
+ /* We potentially do a lot of recalcs as part of this, so make sure
+ stuff that cachings sub-computations see the whole thing instead
+ of clearing between cells. */
+ gnm_app_recalc_start ();
+
sheet_range_bounding_box (sheet,
range_init (&bound, start_col, start_row, end_col, end_row));
SHEET_FOREACH_CONTROL (sheet, view, control,
sc_redraw_range (control, &bound););
+
+ gnm_app_recalc_finish ();
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]