Review Request 108984: Prevent repeated re-layouting of all items after the folder has been loaded

Frank Reininghaus frank78ac at googlemail.com
Sat Feb 16 17:14:27 GMT 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/108984/
-----------------------------------------------------------

Review request for Dolphin.


Description
-------

I tried to find reasons why scrolling is slow when opening folders with many files, see, e.g., http://forum.kde.org/viewtopic.php?f=224&t=107910

I found some code in KStandardItemListView::itemSizeHintUpdateRequired() that tries to prevent expensive re-layouting when icon names or previews are received. Unfortunately, it doesn't work as intended because it only ignores changes in the "iconName" and "iconPixmap" roles, but not in the "iconOverlays" role which also changes when icon names/previews change.

After reading KStandardItemListWidgetInformant::itemSizeHint(), I had the impression that the only roles that might change the size that an item requires are the 'visibleRoles()', i.e., the roles for which text is shown next to the icon. Changing KStandardItemListView::itemSizeHintUpdateRequired() accordingly significantly reduces the number of re-layoutings for me and does not cause any visible regressions so far. I think that this is safe enough for the 4.10 branch, but I'd appreciate it if this could be confirmed by others - we really don't want regressions in the stable branch ;-)


Diffs
-----

  dolphin/src/kitemviews/kstandarditemlistview.cpp 79eb86b 

Diff: http://git.reviewboard.kde.org/r/108984/diff/


Testing
-------

The number of KItemListViewLayouter::doLayout() calls drops significantly according to callgrind. Haven't seen any regressions so far.


Thanks,

Frank Reininghaus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20130216/4e073025/attachment.htm>


More information about the kfm-devel mailing list