r21997 - gnucash/trunk/src/engine - Optimization: don't sort lot list if it will only be traversed to calculate a sum

Geert Janssens gjanssens at code.gnucash.org
Fri Feb 10 10:34:28 EST 2012


Author: gjanssens
Date: 2012-02-10 10:34:28 -0500 (Fri, 10 Feb 2012)
New Revision: 21997
Trac: http://svn.gnucash.org/trac/changeset/21997

Modified:
   gnucash/trunk/src/engine/gncOwner.c
Log:
Optimization: don't sort lot list if it will only be traversed to calculate a sum

Modified: gnucash/trunk/src/engine/gncOwner.c
===================================================================
--- gnucash/trunk/src/engine/gncOwner.c	2012-02-10 15:34:18 UTC (rev 21996)
+++ gnucash/trunk/src/engine/gncOwner.c	2012-02-10 15:34:28 UTC (rev 21997)
@@ -1211,8 +1211,7 @@
 
         /* Get a list of open lots for this owner and account */
         lot_list = xaccAccountFindOpenLots (account, gnc_lot_match_invoice_owner,
-                                            (gpointer)owner,
-                                            (GCompareFunc)gnc_lot_sort_func);
+                                            (gpointer)owner, NULL);
         /* For each lot */
         for (lot_node = lot_list; lot_node; lot_node = lot_node->next)
         {



More information about the gnucash-changes mailing list