r18084 - gnucash/trunk/src/backend/sql - Apply patch by Mike Alexander to speed up price db loading in sql backend.

Phil Longstaff plongstaff at code.gnucash.org
Wed May 20 21:52:47 EDT 2009


Author: plongstaff
Date: 2009-05-20 21:52:47 -0400 (Wed, 20 May 2009)
New Revision: 18084
Trac: http://svn.gnucash.org/trac/changeset/18084

Modified:
   gnucash/trunk/src/backend/sql/gnc-price-sql.c
Log:
Apply patch by Mike Alexander to speed up price db loading in sql backend.


Modified: gnucash/trunk/src/backend/sql/gnc-price-sql.c
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-price-sql.c	2009-05-20 01:26:50 UTC (rev 18083)
+++ gnucash/trunk/src/backend/sql/gnc-price-sql.c	2009-05-21 01:52:47 UTC (rev 18084)
@@ -20,7 +20,7 @@
 \********************************************************************/
 /** @file gnc-price-sql.c
  *  @brief load and save data to SQL 
- *  @author Copyright (c) 2006-2008 Phil Longstaff <plongstaff at rogers.com>
+ *  @author Copyright (c) 2006-2009 Phil Longstaff <plongstaff at rogers.com>
  *
  * This file implements the top-level QofBackend API for saving/
  * restoring data to/from an SQL db
@@ -105,6 +105,7 @@
 			GList* list = NULL;
 			GncSqlRow* row = gnc_sql_result_get_first_row( result );
 
+			gnc_pricedb_set_bulk_update( pPriceDB, TRUE );
         	while( row != NULL ) {
             	pPrice = load_single_price( be, row );
 
@@ -115,6 +116,7 @@
 				row = gnc_sql_result_get_next_row( result );
         	}
 			gnc_sql_result_dispose( result );
+			gnc_pricedb_set_bulk_update( pPriceDB, FALSE );
 
 			if( list != NULL ) {
 				gnc_sql_slots_load_for_list( be, list );



More information about the gnucash-changes mailing list