Revision d744676...

Go back to digest for 6th October 2013

Optimization in KDE Base

Frank Reininghaus committed changes in [kde-baseapps] /src/kitemviews:

Save memory and time in KFileItemModel by lazy-loading the "ItemData"

To reduce unnecessary memory comsumption and CPU usage, we only fill the
QHash<QByteArray, QVariant> if the methods data(int) or setData(int) are
called for the corresponding index, or the data is necessary for sorting
the model.

According to my tests, this patch reduces the memory usage when loading
a folder with 100,000 items by 17% in Icons View, and by 26% in Details

REVIEW: 112725

File Changes

Modified 2 files
  • /src/kitemviews
  •   dolphin/kfileitemmodel.cpp
  •   dolphin/kfileitemmodel.h
2 files changed in total