GDA: Transactions (was Re: Managing large files)

Phil Longstaff plongstaff at rogers.com
Sun Mar 9 18:35:01 EDT 2008


Derek Atkins wrote:

> GnuCash itself wont use an RDBMS as a real DB, but rather it'll just
> use it as a data store, just like any other data store.  IOW, GnuCash
> will still want to load all the records into memory every time.  This
> is just the way GnuCash/QOF currently works, so comparing it to a "real
> DB App" just isn't a fair comparison because, frankly, GnuCash ISNT
> a "real DB App".

Which brings me to the next topic.  Currently, I'm trying to have the
GDA backend load only what is needed on startup, and then load
transactions and splits only when they're needed (when a register is
opened).  There are a number of issues which might or might not be
easily solvable:

1) In the account tree, all balances are 0, even though I try to
calculate the balance, cleared balance and reconciled balance and set
them in the account using g_object_set().
2) When a register is opened, the running balance is always 0.
3) I haven't tried yet, but I would imagine reports will be wrong
because they won't do what is required to force transactions or splits
to be loaded.

My proposed (temporary?) solution is to modify the gda backend to load
all transactions and splits at startup time.  Since all data will be
loaded, I will also (temporarily?) disable query processing so that qof
queries will operate on in-memory data.

All of this can change when GnuCash becomes more of a "real DB App".

Comments?

Phil



More information about the gnucash-devel mailing list