mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-16 18:25:11 -06:00
[commodity-utilities] move gnc:debug to less CPU critical code
pricealist is a long list generated once, yet is dumped via gnc:debug for every call to gnc:exchange-by-pricealist-nearest. This change moves gnc:debug to the initial pricealist generation, ensuring that gnc:exchange-by-pricealist-nearest is much faster.
This commit is contained in:
parent
e783335cf2
commit
b9382d2cf2
@ -803,7 +803,6 @@ construct with gnc:make-gnc-monetary and gnc:monetary->string instead.")
|
||||
;;Used in weighted-average gnc:case-exchange-time-fn only.
|
||||
(gnc:debug "foreign " (gnc:monetary->string foreign))
|
||||
(gnc:debug "domestic " (gnc-commodity-get-printname domestic))
|
||||
(gnc:debug "pricealist " pricealist)
|
||||
(and (record? foreign)
|
||||
(gnc:gnc-monetary? foreign)
|
||||
date
|
||||
@ -873,6 +872,7 @@ construct with gnc:make-gnc-monetary and gnc:monetary->string instead.")
|
||||
(gnc:get-commoditylist-totalavg-prices
|
||||
commodity-list report-currency to-date-tp
|
||||
start-percent delta-percent)))
|
||||
(gnc:debug "weighted-average pricealist " pricealist)
|
||||
(lambda (foreign domestic date)
|
||||
(gnc:exchange-by-pricealist-nearest
|
||||
pricealist foreign domestic date))))
|
||||
|
Loading…
Reference in New Issue
Block a user