Bug #543332: Fix severe performance regression in Average Balance report

Patch by Boris Zbarsky.
BP

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17690 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming 2008-11-13 09:18:07 +00:00
parent bc3f809e8b
commit f14bd06e9a

View File

@ -211,7 +211,14 @@
(gnc:debug "split " split)
(gnc:debug "split-time " split-time)
(gnc:debug "split-amt " split-amt)
(gnc:debug "splits " splits)
;; gnc:debug converts its input to a string before
;; deciding whether to print it, and converting
;; |splits| to a string is O(N) in its length. Since
;; this code runs for every split, leaving that
;; gnc:debug in makes the whole thing O(N^2) in number
;; of splits. If someone really needs this output,
;; they should uncomment the gnc:debug call.
; (gnc:debug "splits " splits)
(update-stats split-amt split-time)
(set! splits (cdr splits))
(split-recurse))))