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

Emmanuel Pescosta emmanuelpescosta099 at gmail.com
Sat Feb 16 18:33:44 GMT 2013


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

Ship it!


Great :) Works fine for me.

- Emmanuel Pescosta


On Feb. 16, 2013, 5:14 p.m., Frank Reininghaus wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/108984/
> -----------------------------------------------------------
> 
> (Updated Feb. 16, 2013, 5:14 p.m.)
> 
> 
> 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/1e59fad7/attachment.htm>


More information about the kfm-devel mailing list