gnucash maint: Multiple changes pushed

Christopher Lam clam at code.gnucash.org
Thu Dec 30 19:21:54 EST 2021


Updated	 via  https://github.com/Gnucash/gnucash/commit/10941589 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/fd3ec14f (commit)
	from  https://github.com/Gnucash/gnucash/commit/6dcb73db (commit)



commit 1094158928f144c4c685dd8f3145c0ffd40bafcc
Merge: 6dcb73db9 fd3ec14f6
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Fri Dec 31 08:16:30 2021 +0800

    Merge branch 'maint-speedup-reconcile-finalize' into maint #1227


commit fd3ec14f6a1087cf08f6ed70ef0960606d207714
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Thu Dec 30 21:56:18 2021 +0800

    [window-reconcile] speed up by postponing account balance recalc
    
    Reconciliation can be sped up tremendously by postponing all account
    balance recalc when modifying splits' reconcile flags.

diff --git a/gnucash/gnome/window-reconcile.c b/gnucash/gnome/window-reconcile.c
index cff11baeb..bffe43cd9 100644
--- a/gnucash/gnome/window-reconcile.c
+++ b/gnucash/gnome/window-reconcile.c
@@ -2286,14 +2286,15 @@ recnFinishCB (GtkAction *action, RecnWindow *recnData)
     gnc_suspend_gui_refresh ();
 
     recnData->delete_refresh = TRUE;
+    account = recn_get_account (recnData);
 
+    xaccAccountBeginEdit (account);
     gnc_reconcile_view_commit(GNC_RECONCILE_VIEW(recnData->credit), date);
     gnc_reconcile_view_commit(GNC_RECONCILE_VIEW(recnData->debit), date);
+    xaccAccountCommitEdit (account);
 
     auto_payment = gnc_prefs_get_bool(GNC_PREFS_GROUP_RECONCILE, GNC_PREF_AUTO_CC_PAYMENT);
 
-    account = recn_get_account (recnData);
-
     xaccAccountClearReconcilePostpone (account);
     xaccAccountSetReconcileLastDate (account, date);
 
@@ -2341,11 +2342,12 @@ recnPostponeCB (GtkAction *action, gpointer data)
     gnc_suspend_gui_refresh ();
 
     recnData->delete_refresh = TRUE;
+    account = recn_get_account (recnData);
 
+    xaccAccountBeginEdit (account);
     gnc_reconcile_view_postpone (GNC_RECONCILE_VIEW(recnData->credit));
     gnc_reconcile_view_postpone (GNC_RECONCILE_VIEW(recnData->debit));
-
-    account = recn_get_account (recnData);
+    xaccAccountCommitEdit (account);
 
     xaccAccountSetReconcilePostponeDate (account, recnData->statement_date);
     xaccAccountSetReconcilePostponeBalance (account, recnData->new_ending);



Summary of changes:
 gnucash/gnome/window-reconcile.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)



More information about the gnucash-changes mailing list