GNU cash slow to load

David Carlson david.carlson.417 at gmail.com
Sun Mar 31 17:25:50 EDT 2013


On 3/31/2013 1:37 PM, Michael Hendry wrote:
> On 31 Mar 2013, at 18:59, John Ralls <jralls at ceridwen.us> wrote:
>
>> On Mar 31, 2013, at 10:40 AM, Michael Hendry <hendry.michael at gmail.com> wrote:
>>
>>> On 31 Mar 2013, at 11:40, Jean-David Beyer <jeandavid8 at verizon.net> wrote:
>>>
>>>> On 03/30/2013 06:15 PM, Liz wrote:
>>>> [snip]
>>>>> As some have hinted, the size of the data file is part of the problem
>>>>> of "slow loading" as the entire data file has to be loaded at startup.
>>>>> My biggest datafile is 547Kb compressed, and probably uncompresses to
>>>>> the 8Mb mark. It has data from 1995.
>>>>> It loads in 12 seconds on a computer I've had for some years, but I
>>>>> have put an SSD in it for my OS (Debian unstable).
>>>>> This speeds up all program loading and is a relatively simple option,
>>>>> cheaper than the new computer.
>>>> I run two instances of GnuCash, one under one user and one under
>>>> another. They both take quite a while to "load." In my case, it is "my
>>>> own fault." I leave several reports open in each. So the program loads
>>>> fairly quickly, but then it has to calculate the reports before I get to
>>>> use the program. My machine has a 4-core Intel Xeon processor. The worst
>>>> report is the one that computes Income/Expense chart report.
>>>>
>>>> This is not a complaint requesting that the report be generated more
>>>> quickly. As I said, it is my own fault.
>>>> _______________________________________________
>>>> 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.
>>> If the time taken to open GnuCash is a problem to you, I wonder if a switch to the database version would help?
>>>
>>> My understanding (which is not informed by any knowledge of the code) is that, by default, GnuCash uses an XML file to store all of your transactions etc. This file has to be opened and read in its entirety when GnuCash is started. I would expect a database version to start up more quickly - I have not done the experiment and this may be untrue, and there may also be good reasons for not using the database version. 
>> Sorry, no, it doesn't work that way. If anything the XML file loads more quickly than a database: Querying the database adds a lot of overhead compared to parsing the XML
>> file into a DOM tree, and we load the whole thing at startup in both cases.
>>
>> The sole performance advantage of the database backend is that everything is written out as it changes, so there's no need to save when you quit Gnucash.
>>
>> Regards,
>> John Ralls
>>
> Thanks for that correction, John.
>
> I hadn't realised that everything was loaded into memory on start-up, as you describe. I had envisaged the database version being used for multi-user access, with GnuCash running on the local machine and accessing a remote server across the internet. I would expect start-up would obviously slower in these circumstances (because the whole database would need to be copied from server to client), unless the GnuCash program were running on the remote server with the local machine behaving purely as a display device.
>
> I learn from other threads that the lock file prevents more than one user accessing the data at any one time, but at least the remote server method allows several individuals to access the accounts. 
>
> Michael
> _______________________________________________
> 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.
>
I am not sure what you are referring to in your last paragraph.  I think
there is still only one user at a  time regardless of where the file
resides.  The only difference would be that the lock is too easily
broken with possibly serious consequences.

David C


More information about the gnucash-user mailing list