AUDIT: r17690 - gnucash/trunk/src/report/standard-reports - Bug #543332: Fix severe performance regression in Average Balance report
Christian Stimming
cstim at cvs.gnucash.org
Thu Nov 13 04:18:07 EST 2008
Author: cstim
Date: 2008-11-13 04:18:07 -0500 (Thu, 13 Nov 2008)
New Revision: 17690
Trac: http://svn.gnucash.org/trac/changeset/17690
Modified:
gnucash/trunk/src/report/standard-reports/average-balance.scm
Log:
Bug #543332: Fix severe performance regression in Average Balance report
Patch by Boris Zbarsky.
BP
Modified: gnucash/trunk/src/report/standard-reports/average-balance.scm
===================================================================
--- gnucash/trunk/src/report/standard-reports/average-balance.scm 2008-11-13 09:13:13 UTC (rev 17689)
+++ gnucash/trunk/src/report/standard-reports/average-balance.scm 2008-11-13 09:18:07 UTC (rev 17690)
@@ -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))))
More information about the gnucash-changes
mailing list