gnucash stable: [report-utilities] more efficient gnc:accounts-get-commodities
Christopher Lam
clam at code.gnucash.org
Thu Jan 11 10:55:13 EST 2024
Updated via https://github.com/Gnucash/gnucash/commit/1a5247c1 (commit)
from https://github.com/Gnucash/gnucash/commit/7a17b24e (commit)
commit 1a5247c10e79345b91e971c253db4e2830ea2b88
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Wed Jan 10 23:46:31 2024 +0800
[report-utilities] more efficient gnc:accounts-get-commodities
don't create intermediate lists which are immediately used and
discarded.
don't locale-compare commodity names, which has locale-transform
overhead, and creates lots of temporary strings.
testing for duplicates via O(N) member is very adequate because
num(unique commodities) is expected to be small.
use the stack when accumulating commodities, avoiding need to prepend
and reverse.
Summary of changes:
gnucash/report/commodity-utilities.scm | 7 +------
gnucash/report/report-utilities.scm | 13 +++++--------
gnucash/report/reports/standard/balsheet-pnl.scm | 7 +------
gnucash/report/reports/standard/test/test-balsheet-pnl.scm | 2 +-
4 files changed, 8 insertions(+), 21 deletions(-)
More information about the gnucash-patches
mailing list