Any tips to improve performance?

Phil Longstaff plongstaff at rogers.com
Mon Dec 28 12:58:33 EST 2009


Many of the reports work by querying the engine for a set of splits matching a specific filter, then looping and adding the values (all in scheme).  Once the database backend is released in 2.4, this can be changed to a single SQL query.

Some preparation for this could begin by adding an appropriate API to the engine (Account?) which takes a QofQuery for splits and returns the sum of the splits.  This at least creates the abstraction needed by the scheme code which can be replaced.

Phil




________________________________
From: Derek Atkins <warlord at MIT.EDU>
To: Adam Rosi-Kessel <adam at rosi-kessel.org>
Cc: "gnucash-user at gnucash.org" <gnucash-user at gnucash.org>
Sent: Mon, December 28, 2009 12:21:21 PM
Subject: Re: Any tips to improve performance?

Hi,

Adam Rosi-Kessel <adam at rosi-kessel.org> writes:

>> gnucash takes a long time to load initially or generate reports. I'm
>> storing data on a local hard drive and it's a pretty modern computer
>> (4 GB RAM, dual-core 2 GHz CPU, solid state hard drive). Generating
>> a cash flow report, for example, can take more than a minute. This
>> is true both under Windows and Linux.
>>
>> I was hopeful the new SQL backend might improve things, so just
>> upgraded to the testing version and saved to MySQL. In fact,
>> everything is slower now.
>>
>> Is this standard for someone with a substantial financial history
>> (going back to 2002)? Am I missing something?

Yeah, many of the reports have sub-optimal algorithms, some of them even
being O(N^3) in terms of #transactions in your data file.  So
unfortunately the only way to speed it up would be to remove historical
data.  At least until the report algorithms can be improved to be O(N)
instead of O(N^2) or O(N^3).

Report algorithm improvement patches always welcome!

> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.

-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
_______________________________________________
gnucash-user mailing list
gnucash-user at gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


More information about the gnucash-devel mailing list