gnucash master: Multiple changes pushed

John Ralls jralls at code.gnucash.org
Sat Aug 19 14:41:56 EDT 2017


Updated	 via  https://github.com/Gnucash/gnucash/commit/4fc61b2a (commit)
	 via  https://github.com/Gnucash/gnucash/commit/c6a72cc5 (commit)
	from  https://github.com/Gnucash/gnucash/commit/7e7d4284 (commit)



commit 4fc61b2ac887dd676c9e44514d07b59db25031eb
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Aug 19 20:25:57 2017 +0200

    Commit imap conversions once per account instead of per import map slot.
    
    Commits are expensive in the SQL backend; this resulted in a >40x
    speedup in loading a database with 3400 import map slots (>2 hours to 3
    minutes).

diff --git a/libgnucash/engine/Account.c b/libgnucash/engine/Account.c
index b2dd987..1daab9e 100644
--- a/libgnucash/engine/Account.c
+++ b/libgnucash/engine/Account.c
@@ -5928,7 +5928,7 @@ convert_imap_account (Account *acc)
     if (g_list_length (imap_list) > 0) // we have mappings
     {
         PINFO("List length is %d", g_list_length (imap_list));
-
+        xaccAccountBeginEdit(acc);
         for (node = imap_list;  node; node = g_list_next (node))
         {
             Account *map_account = NULL;
@@ -5939,7 +5939,6 @@ convert_imap_account (Account *acc)
 
             if (map_account != NULL) // we have an account, try and update it
                 convert_imap_entry (imapInfo, map_account);
-
             // Free the members and structure
             g_free (imapInfo->category_head);
             g_free (imapInfo->full_category);
@@ -5947,6 +5946,7 @@ convert_imap_account (Account *acc)
             g_free (imapInfo->count);
             g_free (imapInfo);
         }
+        xaccAccountCommitEdit(acc);
     }
     g_free (acc_name);
     g_list_free (imap_list); // Free the List

commit c6a72cc596eadae03593dae9166a19210ec64c0c
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Aug 19 20:25:04 2017 +0200

    Revert "Fix mac looking in wrong directory for libgncmod-backend-dbi.dylib."
    
    This reverts commit 6a359f86a07b2adcf6233cafc7531656e02cc6df.

diff --git a/libgnucash/backend/dbi/test/test-backend-dbi.cpp b/libgnucash/backend/dbi/test/test-backend-dbi.cpp
index ff51ab0..4936ed0 100644
--- a/libgnucash/backend/dbi/test/test-backend-dbi.cpp
+++ b/libgnucash/backend/dbi/test/test-backend-dbi.cpp
@@ -30,9 +30,9 @@ extern "C"
 extern void test_suite_gnc_backend_dbi ();
 
 #define GNC_LIB_NAME_1 "gncmod-backend-dbi"
-#define GNC_LIB_REL_PATH_1 "gnucash"
+#define GNC_LIB_REL_PATH_1 "dbi"
 #define GNC_LIB_NAME_2 "gncmod-backend-xml"
-#define GNC_LIB_REL_PATH_2 "gnucash"
+#define GNC_LIB_REL_PATH_2 "xml"
 
 int
 main (int   argc,
diff --git a/libgnucash/engine/gnc-engine.c b/libgnucash/engine/gnc-engine.c
index 34d1348..a61dfd8 100644
--- a/libgnucash/engine/gnc-engine.c
+++ b/libgnucash/engine/gnc-engine.c
@@ -74,10 +74,10 @@ gnc_engine_init_part2()
     } libs[] =
     {
 #if defined( HAVE_DBI_DBI_H )
-        { "gnucash", "gncmod-backend-dbi", TRUE },
+        { "dbi", "gncmod-backend-dbi", TRUE },
 #endif
-        { "gnucash", "gncmod-backend-xml", TRUE },
-        { NULL, FALSE }
+        { "xml", "gncmod-backend-xml", TRUE },
+        { NULL, NULL, FALSE }
     }, *lib;
 
     for (lib = libs; lib->lib ; lib++)



Summary of changes:
 libgnucash/backend/dbi/test/test-backend-dbi.cpp | 4 ++--
 libgnucash/engine/Account.c                      | 4 ++--
 libgnucash/engine/gnc-engine.c                   | 6 +++---
 3 files changed, 7 insertions(+), 7 deletions(-)



More information about the gnucash-changes mailing list