Speeding up reports
cedayiv at gmail.com
Sun Mar 8 18:03:57 EDT 2009
On Sat, Mar 7, 2009 at 3:43 PM, Mike Alexander <mta at umich.edu> wrote:
> Has anyone looked at <http://bugzilla.gnome.org/show_bug.cgi?id=573229>
> to see if my patch makes any sense? It speeds up some reports (e.g.
> Income Statement) by a factor of 50 or so with largish files. It seems
> to work for me, but it affects the report infrastructure and I haven't
> tried to test all the reports.
> I'm going to be gone for a couple of weeks and may have intermittent
> EMail access.
Cool!! I'm certainly not any sort of authority on report infrastructure
(I've dabbled), but I've read your code changes and the concept looks right
to me. Perhaps Christian could comment?
Another small performance gain might be made by changing the two "let*"
calls to "let" in gnc:account-get-trans-type-balance-interval, since the
order of execution is unimportant in those declarations. In particular, the
second "let*" runs inside the loop so it would be good to change it there.
No idea whether the performance difference would be noticeable or not -- and
perhaps there is no improvement at all if Guile is not running
multi-threaded -- but might as well prefer "let" in situations where "let*"
is not required.
I did run a simple test using a sizable "profit & loss" report. Before your
changes, it took 40 seconds. With your changes, it was about 3-4 seconds.
The numbers appear to match as well.
This really should get exercised more. I'm going to go ahead and at least
commit this to trunk. This may be experimental, but I guess that's what
trunk is for, and it seems fine to me so far.
> gnucash-devel mailing list
> gnucash-devel at gnucash.org
More information about the gnucash-devel