Revision 2a9a439...

Go back to digest for 16th February 2014

Optimization in Office

Cristian Oneț committed changes in [kmymoney] /mymoney:

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

File Changes

Modified 2 files
  • /mymoney
  •   kmymoneyobjectcontainer.cpp
  •   kmymoneyobjectcontainer.h
2 files changed in total