Revision 7795970...

Go back to digest for 9th February 2014

Optimization in Office

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

Performance optimization of the register view.

Instead of setting one delegate (the same) for each row by using
QAbstractItemView::setItemDelegateForRow() set the delegate for the
whole view using QAbstractItemView::setItemDelegate(). This way the
view will perform better because the delegate it uses does not depend
on the row on which it needs to be used.

QAbstractItemView::setItemDelegateForRow/Column should only be used if
a different delegate is needed for different rows/columns.

Wouldn't have spotted this without the help of callgrind. I must have
used setItemDelegateForRow() in the early days of my MV programming.

File Changes

Modified 2 files
  • /widgets
  •   kmymoney/register.cpp
  •   kmymoney/register.h
2 files changed in total