> On May 12, 2014, 11:08 p.m., Marko Käning wrote: > > I'll incorporate it as soon as possible in a updated version of > > https://git.reviewboard.kde.org/r/112885/ . > > > > Thanks, Alvaro, for doing this job. > > > > I'll also report back as soon as I can regarding speed. > > Marko Käning wrote: > Only now I realise that you did not cache the value in any case which > lets you re-iterate through all transactions at every call... > > Wasn't there some caching built-in for the corresponding > MyMoneyFile::balance()? > > Marko Käning wrote: > Alvaro, I successfully incorporated your patch using git master and ran > my actual kmy with it. > > My account with the most transactions didn't show any significant change > of speed (although there's seemingly no caching up to now - but perhaps I am > mistaken there?). > > This was measured manually as the time lag until the corresponding ledger > appears after clicking the ledger icon - i.e. not applying any debug output - > which resulted in a duration of about 1.5s.
TBH, at first I thought this feature was only used during reconciliation and not every time the ledger is loaded. In any case, there are still some optimizations to be made (eg. caching, calculating the cleared balance with a different method if the account was never reconciled, etc.), but it only makes sense to optimize once a problem has been detected. - Alvaro ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/118107/#review57833 ----------------------------------------------------------- On May 12, 2014, 10:53 p.m., Alvaro Soliverez wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://git.reviewboard.kde.org/r/118107/ > ----------------------------------------------------------- > > (Updated May 12, 2014, 10:53 p.m.) > > > Review request for KMymoney. > > > Repository: kmymoney > > > Description > ------- > > It calculates cleared balance for an account in MyMoneyFile, instead of doing > it in the ledger view (kgloballedgerview.cpp) > > I'm posting it here because I'm a bit concerned on the performance it may > have for everyday use. > I'm keen on optimizing, but this kind of code should be removed from the > views in the long-term. > > > Diffs > ----- > > kmymoney/mymoney/mymoneyfile.h 3a39ba0 > kmymoney/mymoney/mymoneyfile.cpp 4f6d277 > kmymoney/views/kgloballedgerview.cpp d2d626c > > Diff: https://git.reviewboard.kde.org/r/118107/diff/ > > > Testing > ------- > > I tested with a small file. It works ok. I still have to add a unit test for > it. > > > Thanks, > > Alvaro Soliverez > >
_______________________________________________ KMyMoney-devel mailing list KMyMoney-devel@kde.org https://mail.kde.org/mailman/listinfo/kmymoney-devel