[Kmymoney-devel] Review Request 115680: Performance optimization of the mymoney object container.
Cristian Oneț
onet.cristian at gmail.com
Tue Mar 4 17:20:16 UTC 2014
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115680/
-----------------------------------------------------------
(Updated March 4, 2014, 5:20 p.m.)
Status
------
This change has been marked as submitted.
Review request for KMymoney and Thomas Baumgart.
Repository: kmymoney
Description
-------
Performance optimization of the mymoney object container.
The MyMoneyObjectContainer::account(QString) was the most costly
method of this class. Mainly due to the calls to dynamic_cast
needed to obtain the cached MyMoneyObject with it's proper type.
Improved this by:
1. implementing a per object type cache.
2. using QHash instead of QMap which provides faster lookups
3. replace macro method implementation with template methods
REVIEW: 115680
Diffs
-----
kmymoney/mymoney/mymoneyobjectcontainer.h 2abc0f06632b4c29f6443ab3ad66cccf6a4ce1d9
kmymoney/mymoney/mymoneyobjectcontainer.cpp 796d9aa8cb44de5a449bb54f1a46e313ff65cf0d
Diff: https://git.reviewboard.kde.org/r/115680/diff/
Testing
-------
Ran unit test. Profiled application and observed a performance improvement.
File Attachments
----------------
File load before optimization
https://git.reviewboard.kde.org/media/uploaded/files/2014/02/11/5a184cd9-42d1-4bbf-9fc2-0709b0987d14__file-load-before.png
File load after optimization
https://git.reviewboard.kde.org/media/uploaded/files/2014/02/11/4b430712-a66e-410c-9a1a-15f990370043__file-load-after.png
Register load before optimization
https://git.reviewboard.kde.org/media/uploaded/files/2014/02/11/eaa62d0b-1035-481e-a947-fac60fd6f388__register-load-before.png
Register load after optimization
https://git.reviewboard.kde.org/media/uploaded/files/2014/02/11/55f57547-1b6b-436e-bd23-89c43da23be8__register-load-after.png
Thanks,
Cristian Oneț
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kmymoney-devel/attachments/20140304/e2eae633/attachment.html>
More information about the KMyMoney-devel
mailing list