All Change for register2

Robert Fewell 14ubobit at gmail.com
Sun Jul 28 15:27:39 EDT 2013


Hi Guy's,

I have been trying to get the new register to be quicker by moving the way
bits of code are loaded but have been unable to gain a significant
improvement so I have changed my approach.

The patch in Bug 705040, allows the cursor keys to move the selection while
in edit mode as requested. Also it changes the way the extra dates are
enabled to use a preference option for the default and also a menu option.
These extra dates, entered and reconciled are shown below the posted date
as before.

With the patch on Bug 705042, I have changed the model to load a subset of
transactions which has given me the speed increase required. This has been
achieved by removing the filter model, setting the sort model to not sort
and using the Qof query to deliver the sorted transactions to the model in
the correct order. There is some more work to be done here as the query is
run multiple times for the account, the sort, the filter and finally some
view options and would like to reduce this to one. This is basically what
happens...

There is a define in gnc.....model.h which specifies the base number of
transactions to load which is set to 30 and should be greater than the
number of single transactions displayed, I may add a function to calculate
this.

On account load, this number is multiplied by 3 which is then used to load
that number of transactions from the appropriate transaction list end based
on sort direction. If there are less than this figure, all transactions are
loaded. When the selected transaction is less than a third from an end, a
block of transactions gets added to the view list and the same number
removed from the opposite end maintaining in this case 90 transactions in
the view list.

Navigation with the following keys work, cursor up/down, page up/down, home
and end. Goto blank and jump to transaction work. Also if you select a
transaction with the mouse which is in the third, this with load a new
block.

With only loading part of the transaction list, the right scroll bar only
scrolls in this part so I have added a new one to scroll the full list on
the left which I think works quite well. Personally I do not think I scroll
back more the 90 transactions while entering so this would not affect me. I
did try to get the existing scroll bar to do a similar job but was
unsuccessful.

So every thing else should work as before, I know the code needs cleaning
up as there are some duplicate functions and entries which I will do later.

Regards,

      Robert


More information about the gnucash-devel mailing list