Review Request 114460: Remove even more redundant data from KItemListViewLayouter
Emmanuel Pescosta
emmanuelpescosta099 at gmail.com
Sun Dec 22 14:32:49 GMT 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/114460/#review46043
-----------------------------------------------------------
dolphin/src/kitemviews/private/kitemlistviewlayouter.cpp
<https://git.reviewboard.kde.org/r/114460/#comment32840>
m_itemInfos[index] -> m_itemInfos.at(index)
dolphin/src/kitemviews/private/kitemlistviewlayouter.cpp
<https://git.reviewboard.kde.org/r/114460/#comment32841>
m_itemInfos[index] -> m_itemInfos.at(index)
dolphin/src/kitemviews/private/kitemlistviewlayouter.cpp
<https://git.reviewboard.kde.org/r/114460/#comment32842>
m_itemInfos[index] -> m_itemInfos.at(index)
dolphin/src/kitemviews/private/kitemlistviewlayouter.cpp
<https://git.reviewboard.kde.org/r/114460/#comment32843>
m_itemInfos[index] -> m_itemInfos.at(index)
dolphin/src/kitemviews/private/kitemlistviewlayouter.cpp
<https://git.reviewboard.kde.org/r/114460/#comment32844>
m_itemInfos[mid] -> m_itemInfos.at(mid)
dolphin/src/kitemviews/private/kitemlistviewlayouter.cpp
<https://git.reviewboard.kde.org/r/114460/#comment32845>
m_itemInfos[mid] -> m_itemInfos.at(mid)
dolphin/src/kitemviews/private/kitemlistviewlayouter.cpp
<https://git.reviewboard.kde.org/r/114460/#comment32846>
m_itemInfos[mid] -> m_itemInfos.at(mid)
dolphin/src/kitemviews/private/kitemlistviewlayouter.cpp
<https://git.reviewboard.kde.org/r/114460/#comment32847>
m_itemInfos[mid] -> m_itemInfos.at(mid)
dolphin/src/kitemviews/private/kitemlistviewlayouter.cpp
<https://git.reviewboard.kde.org/r/114460/#comment32848>
m_itemInfos[mid - 1] -> m_itemInfos.at(mid - 1)
dolphin/src/kitemviews/private/kitemlistviewlayouter.cpp
<https://git.reviewboard.kde.org/r/114460/#comment32849>
m_itemInfos[mid] -> m_itemInfos.at(mid)
dolphin/src/kitemviews/private/kitemlistviewlayouter.cpp
<https://git.reviewboard.kde.org/r/114460/#comment32850>
m_itemInfos[mid] -> m_itemInfos.at(mid)
- Emmanuel Pescosta
On Dec. 14, 2013, 7:37 p.m., Frank Reininghaus wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/114460/
> -----------------------------------------------------------
>
> (Updated Dec. 14, 2013, 7:37 p.m.)
>
>
> Review request for Dolphin.
>
>
> Repository: kde-baseapps
>
>
> Description
> -------
>
> After https://git.reviewboard.kde.org/r/113487/, KItemListViewLayouter still stores quite a bit of redundant data.
>
> For every item, we store the coordinates of its top-left corner in a QPointF 'pos' in the ItemInfo struct. This requires
>
> 2 * "number of items" doubles.
>
> However, pos.x is the same for all items in one column, and pos.y is the same for all items in a row. Therefore, some memory can be saved by removing the 'pos' member, and adding two QVector<qreal>
>
> m_rowOffsets and m_columnOffsets
>
> instead. This reduces the memory requirement to
>
> "number of rows + number of columns" doubles, which is at least 50% less.
>
>
> Diffs
> -----
>
> dolphin/src/kitemviews/private/kitemlistviewlayouter.h a3b0893
> dolphin/src/kitemviews/private/kitemlistviewlayouter.cpp f5f63d5
>
> Diff: https://git.reviewboard.kde.org/r/114460/diff/
>
>
> Testing
> -------
>
> Verfified with KSysGuard that the memory consumption is reduced as expected. View layout and scrolling still seem to work OK in all view modes and with grouping enabled or disabled.
>
>
> Thanks,
>
> Frank Reininghaus
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20131222/26de2024/attachment.htm>
More information about the kfm-devel
mailing list