Revision dcfed00...
Go back to digest for 3rd November 2013Optimization in KDE Base
Frank Reininghaus committed changes in [kde-baseapps] /src/kitemviews/private:
Prevent storing some redundant data in KItemListViewLayouter
In KItemListViewLayouter, we have always stored a QRectF for each item,
which is "the area that the item occupies". However, the size of the
QRectF is already stored in the size hint resolver.
Therefore, it is sufficient to store the position of the top left
corner of the QRectF in a QPointF and construct the QRectF on demand.
This patch reduces the memory usage by 16 bytes for each item in the
view:
* a QRectF is 4 doubles -> 32 byes
* a QPointF contains only 2 doubles -> 16 bytes
REVIEW: 113487
File Changes
Modified 2 files
- /src/kitemviews/private
- dolphin/kitemlistviewlayouter.cpp
- dolphin/kitemlistviewlayouter.h
2 files changed in total