[GNC] I'm still a bit confused about when things get saved.

Chris Green cl at isbd.net
Thu Sep 10 09:22:23 EDT 2020


On Thu, Sep 10, 2020 at 08:58:04AM -0400, Derek Atkins wrote:
> Hi,
> 
> On Thu, September 10, 2020 8:32 am, Chris Green wrote:
> >
> > When does data entered get saved?  Also are there different 'levels'
> > of save as it were?
> 
> Yes, there are different levels of data storage, per se.  There are:
> 
> * Data Entry -- the data only lives in the UI
> * Commit -- the data is stored into the in-memory cache of your data
> * Save -- the in-memory cache is written to disk
> 
Excellent, thank you, it seems odd that this isn't made explicit
anywhere in the documentation (or is it?).  Maybe it's just my
software engineering rather than accounting background! :-)

[snip]


> > Many/most applications seem to save data automatically by default,
> > i.e. the data gets saved to file/disk as you move from field to field.
> 
> Um, I don't think so.  Havent you ever lost work in Word/Excel/Powerpoint
> (or their LibreOffice counterparts)?  I know I have!  Indeed, MOST
> applications require a manual save, or have a periodic (but not
> instantaneous) auto-save.  A save-as-you-go is VERY expensive, especially
> when a save means serializing the whole dataset into a file and writing it
> to disk -- with lots of data that can take several seconds at a pop.  Many
> (most!) people wouldn't want their session to freeze for 10 seconds every
> time they enter a transaction!
> 
I very rarely if ever use Word/Excel/Powerpoint (or equivalents), if I
do data entry it's to a database.  I wrote my own small company
accounting software in Access (long time ago, I'm 100% Linux now).

I suspect that with my small accounts file and a (fairly fast)
computer and SSD I wouldn't notice any delay at all.


> I am not saying that there isn't room for improvement, but we got to where
> we are today over multiple decades of back and forth to ensure the "best"
> of all worlds, but with tweaks to make everyone happy.  Feel free to set
> your autosave to 1 minute if that's what you want.  If you haven't made
> any change then it won't do anything, but it does mean your app will
> freeze a lot as it saves in the "background".
> 
I'll more likely move to using sqlite.  I have quite a lot of things
using it (apart from the half of Linux that uses it anyway that is)
and I run hourly incremental backups on my system so that's covered.


> Hope this helps,
> 
Yes, it really does, thanks Derek.  

I expect I will slowly fade into silence now, I hope I haven't been
making too much noise here.

-- 
Chris Green


More information about the gnucash-user mailing list