reports - excruciatingly slow
Derek Atkins
warlord at MIT.EDU
Thu Sep 27 16:31:43 EDT 2007
Quoting Andrew Sackville-West <ajswest at mindspring.com>:
> Derek, what, in your estimation, is the cause of this? I've been
> suffering with slow reports for a while and now with 2.2 in deb/sid,
> it seems even worse (two minutes to run a monthly income statement).
> Diving into the C is not something I'm in a position to do, but if
> its things in the Scheme parts, I'm interested in tackling it.
I suspect it's in the Scheme, not the C...
> I know the stock answer -- go read the code... I'll do it. But my O(n)
> fu is pretty weak, so if you have a pointer that would be great. Is it
> just really inefficient iteration over transactions within the reports
> themselves? or something more subtle in the calls to the gnc: hooks
> that cause the backend to iterate over the transactions a bunch?
In particular, I suspect it's really inefficient iteration over transactions
with the reports. For example, I think the generic html-table generator
code that was added in 2.0 (IIRC) adds an O(n^2) factor to reports because
of how it iterates.
The underlying C code hasn't changed between 1.8 and 2.x, the only major
change has been in the scheme side.. And the reports DID slow down
during that time, so it leads me to believe that the problem is in the
scheme, not the C. If the slowdown was between 1.6 and 1.8 then I'd
have a different answer. ;)
> I'll spend a few hours over the next week or so looking at it to see
> if I can somehow help in that regard.
That would be excellent!
> A
-derek
--
Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
Member, MIT Student Information Processing Board (SIPB)
URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
warlord at MIT.EDU PGP key available
More information about the gnucash-user
mailing list