gnucash stable: [gnc-autoclear.cpp] prune search if remaining amounts are too small
Christopher Lam
clam at code.gnucash.org
Mon Nov 17 06:40:58 EST 2025
Updated via https://github.com/Gnucash/gnucash/commit/7c73e2ab (commit)
from https://github.com/Gnucash/gnucash/commit/e4d61b30 (commit)
commit 7c73e2ab2c757177c3143bfb9035e2e47fd9120f
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Sun Nov 16 11:53:37 2025 +0800
[gnc-autoclear.cpp] prune search if remaining amounts are too small
this optimisation will greatly reduce the search size. first, sort
splits by reverse absolute amount. then precompute the positive and
negative sum(amounts) of remaining splits. when exploring any branch,
if the target is falls outside the range remaining negative to
positive sums, then any combination of subsequent splits will not
reach target. bail early.
Summary of changes:
libgnucash/app-utils/gnc-autoclear.cpp | 36 +++++++++++++++++++++++++++++++---
1 file changed, 33 insertions(+), 3 deletions(-)
More information about the gnucash-patches
mailing list