Bug 315315 - Dolphin re-layouts all items too often in folders with many items while previews and/or mime types are received.
Summary: Dolphin re-layouts all items too often in folders with many items while previ...
Alias: None
Product: dolphin
Classification: Applications
Component: view-engine: general (show other bugs)
Version: 2.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
Depends on:
Reported: 2013-02-17 10:30 UTC by Frank Reininghaus
Modified: 2013-02-17 10:31 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 4.10.1


Note You need to log in before you can comment on or make changes to this bug.
Description Frank Reininghaus 2013-02-17 10:30:21 UTC
The code in KStandardItemListView::itemSizeHintUpdateRequired() which tries to prevent expensive re-layoutings every time an iconName or iconPixmap is received does not work because it does not consider the iconOverlays role, which usually also changes if one of the others changes.

This is at least a part of the reason why scrolling the view in folders with many items is slow for some time after the folder has been opened, see bug 306290 and http://forum.kde.org/viewtopic.php?f=224&t=107910.

A fix is coming up, see https://git.reviewboard.kde.org/r/108984/.

Reproducible: Always
Comment 1 Frank Reininghaus 2013-02-17 10:31:35 UTC
Git commit daf12b8eb379d7a74919f6ae9952fb3b51bd85af by Frank Reininghaus.
Committed on 17/02/2013 at 11:21.
Pushed by freininghaus into branch 'KDE/4.10'.

Prevent repeated re-layouting of all items while previews are generated

There was some code in KStandardItemListView::itemSizeHintUpdateRequired
already that was supposed to prevent an expensive re-layouting of all
items when a preview is received. However, it didn't quite work as
intended because also the "iconOverlays" role changed.

The new approach is to only re-layout if text of a visible role changes,
because this is the only way how the space needed by an item might
change (see KStandardItemListWidgetInformant::itemSizeHint()).
FIXED-IN: 4.10.1
REVIEW: 108984

M  +8    -8    dolphin/src/kitemviews/kstandarditemlistview.cpp