mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
When creating lists of database objects, use g_list_prepend() rather than g_list_append(). There may be cases where the list order is significant and thus needs to be reversed, but that is not true in these cases. This provides a large improvement in database loading performance.
Analysis and basis patch supplied by Donald Allen. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18724 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -245,7 +245,7 @@ load_all_sxes( GncSqlBackend* be )
|
||||
sx = load_single_sx( be, row );
|
||||
if( sx != NULL ) {
|
||||
gnc_sxes_add_sx( sxes, sx );
|
||||
list = g_list_append( list, sx );
|
||||
list = g_list_prepend( list, sx );
|
||||
}
|
||||
row = gnc_sql_result_get_next_row( result );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user