From 5a1fd75d3ad8be27f59c9a9a2f036382be9b65fb Mon Sep 17 00:00:00 2001 From: Phil Longstaff Date: Thu, 21 May 2009 01:52:47 +0000 Subject: [PATCH] Apply patch by Mike Alexander to speed up price db loading in sql backend. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18084 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/backend/sql/gnc-price-sql.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/backend/sql/gnc-price-sql.c b/src/backend/sql/gnc-price-sql.c index 598cd3c908..ac8e71fb91 100644 --- a/src/backend/sql/gnc-price-sql.c +++ b/src/backend/sql/gnc-price-sql.c @@ -20,7 +20,7 @@ \********************************************************************/ /** @file gnc-price-sql.c * @brief load and save data to SQL - * @author Copyright (c) 2006-2008 Phil Longstaff + * @author Copyright (c) 2006-2009 Phil Longstaff * * This file implements the top-level QofBackend API for saving/ * restoring data to/from an SQL db @@ -105,6 +105,7 @@ load_all_prices( GncSqlBackend* be ) 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 @@ load_all_prices( GncSqlBackend* be ) 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 );