Review Request 112580: Make preview loading faster when scrolling

Frank Reininghaus frank78ac at googlemail.com
Sat Sep 7 17:40:32 BST 2013


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

Review request for Dolphin and Christoph Feck.


Description
-------

KFileItemListView notifies KFileItemModelRolesUpdater of changes of the visible index range and the icon size with a delay, to prevent that expensive operations are triggered repeatedly.

As far as I can tell, the original idea was to have a delay of 300 ms only if something really expensive (like the re-generation of all previews) would be triggered. However, as Christoph found out, this rather long delay is also used while scrolling, see https://git.reviewboard.kde.org/r/112312/.

The code was a bit confusing - it used two different timers for "visible index range" changes and "icon size" changes, but both timers were assigned the same interval, which was also updated every time anything interesting happened.

I think that it gets much simpler (and preview generation more responsive) if both timers have different intervals, and the "long" interval is really only used if the icon size has changed.

Thanks to Christoph for analyzing this problem!


This addresses bug 322093.
    http://bugs.kde.org/show_bug.cgi?id=322093


Diffs
-----

  dolphin/src/kitemviews/kfileitemlistview.h 49ff773 
  dolphin/src/kitemviews/kfileitemlistview.cpp 2da238d 

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


Testing
-------

Previews are loaded much faster when scrolling through the view. I could not see any regressions yet.


Thanks,

Frank Reininghaus

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


More information about the kfm-devel mailing list