From kfm-devel Sat Dec 14 18:37:21 2013 From: "Frank Reininghaus" Date: Sat, 14 Dec 2013 18:37:21 +0000 To: kfm-devel Subject: Review Request 114460: Remove even more redundant data from KItemListViewLayouter Message-Id: <20131214183721.17792.34736 () vidsolbach ! de> X-MARC-Message: https://marc.info/?l=kfm-devel&m=138704624907055 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============9065295519419281756==" --===============9065295519419281756== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/114460/ ----------------------------------------------------------- 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 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: http://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 --===============9065295519419281756== Content-Type: text/html; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit
This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/114460/

Review request for Dolphin.
By Frank Reininghaus.
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.

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.

Diffs

  • dolphin/src/kitemviews/private/kitemlistviewlayouter.h (a3b0893)
  • dolphin/src/kitemviews/private/kitemlistviewlayouter.cpp (f5f63d5)

View Diff

--===============9065295519419281756==--