mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
When committing an account during the closing of a book, don't search
the engine for splits that are in the process of being assigned to the account but aren't yet linked into the account. This eliminates an O(n*m) operation that will never find any work to perform. Fixes #344473. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14358 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
9b7245002d
commit
85e56e2e95
@ -1,5 +1,11 @@
|
|||||||
2006-06-12 David Hampton <hampton@employees.org>
|
2006-06-12 David Hampton <hampton@employees.org>
|
||||||
|
|
||||||
|
* src/engine/Account.c: When committing an account during the
|
||||||
|
closing of a book, don't search the engine for splits that are in
|
||||||
|
the process of being assigned to the account but aren't yet linked
|
||||||
|
into the account. This eliminates an O(n*m) operation that will
|
||||||
|
never find any work to perform. Fixes #344473.
|
||||||
|
|
||||||
* src/quotes/gnc-fq-check.in: Quote the F::Q version number so
|
* src/quotes/gnc-fq-check.in: Quote the F::Q version number so
|
||||||
that it will be correctly parsed as a string.
|
that it will be correctly parsed as a string.
|
||||||
|
|
||||||
|
@ -381,8 +381,10 @@ xaccAccountCommitEdit (Account *acc)
|
|||||||
g_assert(acc->splits == NULL || qof_book_shutting_down(acc->inst.book));
|
g_assert(acc->splits == NULL || qof_book_shutting_down(acc->inst.book));
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if (!qof_book_shutting_down(acc->inst.book)) {
|
||||||
col = qof_book_get_collection(acc->inst.book, GNC_ID_TRANS);
|
col = qof_book_get_collection(acc->inst.book, GNC_ID_TRANS);
|
||||||
qof_collection_foreach(col, destroy_pending_splits_for_account, acc);
|
qof_collection_foreach(col, destroy_pending_splits_for_account, acc);
|
||||||
|
}
|
||||||
|
|
||||||
/* the lots should be empty by now */
|
/* the lots should be empty by now */
|
||||||
for (lp = acc->lots; lp; lp = lp->next)
|
for (lp = acc->lots; lp; lp = lp->next)
|
||||||
|
Loading…
Reference in New Issue
Block a user