Speeding up gnucash

John Ralls jralls at ceridwen.us
Thu Feb 27 12:47:15 EST 2014


On Feb 27, 2014, at 9:08 AM, David J. Bakeman <dbakeman at comcast.net> wrote:

> On 02/26/2014 08:05 PM, John Ralls wrote:
>> On Feb 26, 2014, at 7:14 PM, AC <gnucash at acarver.net> wrote:
>> 
>>> I'm currently running the Windows version 2.4.15.  Is there a way to
>>> speed up the read and write operations?  Right now when I save my
>>> updates it takes about two minutes to write everything to disk.  When
>>> loading, it can sometimes take a while to load the file and populate the
>>> registers.
>> Heh. You think 2.4.15 is slow, try 2.6.1.
>> 
>> Unfortunately, reading a large file and creating all of the objects or serializing all of the objects and writing them back into a file is slow. After a couple of bug reports about files being corrupted by invalid UTF8 and ASCII control characters, the latter of which are illegal in XML, 2.6 introduced checking every string for invalid characters. That slows down loads, imports, and saves even more.
> So every time the database is loaded and saved it's sanitized?  How
> would the bad chars get in while gnucash is running?  If it's from the
> import transaction stuff shouldn't they do the checking?  That way the
> database used while gnucash is running is always sanitized.  So checking
> can be skipped during the save.  Further couldn't you then mark the save
> as clean so when you load the database the next time you can skip the
> check?

It checks on import as well, of course. Bad strings can be introduced from the GUI by copy & paste, and that code is a mess, so I can't be sure that every instance is caught at input. Since the checks were only introduced in 2.4.14 and 2.6.0, it's possible to create a corrupted file in an older version.

Marking the file as saved clean so that it doesn't have to be checked on open is an interesting idea. I hadn't thought of that.

Regards,
John Ralls




More information about the gnucash-user mailing list