This bug was annoying me for a long time. I use kmymoney for several years and I have about 15k entries (about 5k per one account). Every first switch to ledger view takes ~5s. (package from repo, version 4.6) I was pretty sure that I don't have so much data to process so long. After debugging I saw that problem is in Register::resize that every time goes through all 5k entries for each visible columns and calculating minimal width of column by rendering its text. Register::resize is called about 4 times per first switch (3 times with 'force==true' flag, so guard at the beginning of the function doesn't help us).
So this little optimization makes it possible to call Register::resize as much as you want and it won't affect performance if nothing changed in items.
Details
Details
- Reviewers
tbaumgart - Group Reviewers
KMyMoney - Commits
- R261:275ad37820c2: Speed up first switch to ledgerview
Diff Detail
Diff Detail
- Repository
- R261 KMyMoney
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.