r17737 - gnucash/branches/2.2/src/report/standard-reports - [r17690] Bug #543332: Fix severe performance regression in Average Balance report
Christian Stimming
cstim at cvs.gnucash.org
Thu Nov 27 06:18:16 EST 2008
Author: cstim
Date: 2008-11-27 06:18:15 -0500 (Thu, 27 Nov 2008)
New Revision: 17737
Trac: http://svn.gnucash.org/trac/changeset/17737
Modified:
gnucash/branches/2.2/src/report/standard-reports/average-balance.scm
Log:
[r17690] Bug #543332: Fix severe performance regression in Average Balance report
Patch by Boris Zbarsky.
Modified: gnucash/branches/2.2/src/report/standard-reports/average-balance.scm
===================================================================
--- gnucash/branches/2.2/src/report/standard-reports/average-balance.scm 2008-11-27 11:18:06 UTC (rev 17736)
+++ gnucash/branches/2.2/src/report/standard-reports/average-balance.scm 2008-11-27 11:18:15 UTC (rev 17737)
@@ -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