mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-12-02 05:29:20 -06:00
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
This commit is contained in:
parent
2e463d7781
commit
5a1fd75d3a
@ -20,7 +20,7 @@
|
||||
\********************************************************************/
|
||||
/** @file gnc-price-sql.c
|
||||
* @brief load and save data to SQL
|
||||
* @author Copyright (c) 2006-2008 Phil Longstaff <plongstaff@rogers.com>
|
||||
* @author Copyright (c) 2006-2009 Phil Longstaff <plongstaff@rogers.com>
|
||||
*
|
||||
* 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 );
|
||||
|
Loading…
Reference in New Issue
Block a user