reports - excruciatingly slow

Andrew Sackville-West ajswest at mindspring.com
Thu Sep 27 16:40:36 EDT 2007


On Thu, Sep 27, 2007 at 04:31:43PM -0400, Derek Atkins wrote:
> 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.

okay, that's a place to start looking. I'll need a little coaching to
get up to speed on the report scheme again. I'll drop into irc soon
and see who's willing to grind some brain cells with me.

>
> 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. ;)

make sense to me.

>
>> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.gnucash.org/pipermail/gnucash-user/attachments/20070927/e8c42100/attachment.bin 


More information about the gnucash-user mailing list