----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/115680/ -----------------------------------------------------------
(Updated Feb. 12, 2014, 9:55 p.m.) Review request for KMymoney and Thomas Baumgart. Changes ------- Use qDeleteAll instead of iterating and deleting items. Repository: kmymoney Description (updated) ------- 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 (updated) ----- 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ț
_______________________________________________ KMyMoney-devel mailing list KMyMoney-devel@kde.org https://mail.kde.org/mailman/listinfo/kmymoney-devel