Review Request 112580: Make preview loading faster when scrolling

Commit Hook null at kde.org
Sat Sep 14 14:02:59 BST 2013


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

(Updated Sept. 14, 2013, 1:02 p.m.)


Status
------

This change has been marked as submitted.


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/20130914/c1384a9b/attachment.htm>


More information about the kfm-devel mailing list