GNU cash slow to load

Michael Hendry hendry.michael at gmail.com
Mon Apr 1 06:45:58 EDT 2013


On 31 Mar 2013, at 22:25, David Carlson <david.carlson.417 at gmail.com> wrote:

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

At first glance, there doesn't seem to be any need for a lock file on a single-user computer - indeed it's a nuisance if the computer has crashed or been shut down while GnuCash is still running.

Thinking again, I realise that I could accidentally start up a second instance of GnuCash on my own computer, and run into trouble with conflicting updates to the data file.

Where it's possible for more than one individual to access the same GnuCash file, the lock file switches from being desirable to being essential.

What I was trying to say was that even though GnuCash doesn't support multiple simultaneous users, several members of (for example) a geographically separated family could have non-simultaneous access to the same set of accounts. I was thinking about this in the context of Mark Phillips's recent thread "How to share reports online"; he is looking after his mother's financial affairs and needed to issue reports to his siblings. He came to the conclusion that he should give them access to reports he had created and stored online, rather than give them access to the GnuCash application.

I'm not sure if there are any plans to shift GnuCash from a single-user model to a multi-user client-server set-up, but I suppose that a first step in that direction would involve a database rather than a text file.

Michael

> David C
> _______________________________________________
> 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-user mailing list