[Kmymoney-devel] AccountsModel loadInstitution and loadSubaccounts recursiveness

Cristian Oneţ onet.cristian at gmail.com
Sat Sep 25 19:56:08 CEST 2010


On Sat, Sep 25, 2010 at 5:44 PM, Alvaro Soliverez <asoliverez at kde.org> wrote:
> On Sat, Sep 25, 2010 at 11:23 AM, Cristian Oneţ <onet.cristian at gmail.com> wrote:
>>>
>>> How about adding two sets of signals? One that is emitted whenever
>>> there is an account change, and another that covers transactions?
>> I don't know if it would but it would be a solution only for this
>> model and not a complete solution. The complete solution would be to
>> have signals for each mymoney objects that are changed but adding such
>> a facility is a pretty big task (I've just checked) and I don't know
>> if it is worth it.
>>
> I know it's not complete, but this is one of the big performance
> problems we have. Solving this would give us more time until we find a
> complete solution.
>
> At the moment, recurring calls to load the accounts model, and the
> slow loading when auto entering schedules are two of the main issues
> we have regarding performance.
>
> Also, I would disconnect dataChanged and AccountsModel, and only
> connect it through views that actually use the accountmodel, if
> possible.
> For example, any change on the home view will trigger an update of the
> model, even if that view doesn't really use it at all.
>

I know it's not much but could you guys please take a look at this
patch (I haven't submitted it trough the reviewboard since it's a
pinpointed change)? It delays calling AccountsModel::load() after
dataChanged() is emitted until the moment there is nothing else to
execute in the event loop. This means that the UI has time to update
after dataChange is emitted (the ledger seems a bit more responsive
when changing the status of a transaction) and after load() does get
executed (hopefully while the user is idle) all the data in the UI
will be correct since the model notifies the view of any data change
during load().

Regards,
Cristian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: call_load_on_idle.patch
Type: text/x-patch
Size: 1569 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kmymoney-devel/attachments/20100925/76ff2f55/attachment.patch 


More information about the KMyMoney-devel mailing list