Review Request 111008: KFileItemModelRolesUpdater polishing, part 1: simplify preview job handling

Emmanuel Pescosta emmanuelpescosta099 at gmail.com
Wed Jun 19 09:52:14 BST 2013


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

Ship it!


Ship It!

- Emmanuel Pescosta


On June 13, 2013, 8:51 p.m., Frank Reininghaus wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/111008/
> -----------------------------------------------------------
> 
> (Updated June 13, 2013, 8:51 p.m.)
> 
> 
> Review request for Dolphin.
> 
> 
> Description
> -------
> 
> This patch changes two things about the way we handle the preview job:
> 
> (a) Rather than passing a KFileItemList to startPreviewJob(), remembering the leftovers in a member variable and then starting a new preview job for these, I propose to just add items that need a preview to this KFileItemList member, and let startPreviewJob() take its input from there. Makes the code a lot simpler.
> 
> (b) To prevent that we start preview jobs with just 1 item and also that the GUI is frozen too long by startPreviewJob(), I propose the following method:
> 
> * If the mime type of the first pending item is known, the function has probably been called by startUpdating(), which has determined mime types for the visible items already. startUpdating() has also blocked the GUI, so we just take all items at the beginning of the list with known mime type, and do not do any expensive mime type determination in startPreviewJob().
> 
> * If the mime type of the first pending item is unknown, the function has probably been called by slotPreviewJobFinished(). In that case, we can affort to block the GUI for a short while, so we determine mime types for 200 ms.
> 
> 
> Diffs
> -----
> 
>   dolphin/src/kitemviews/kfileitemmodelrolesupdater.cpp e539b45 
>   dolphin/src/kitemviews/kfileitemmodelrolesupdater.h aa47f17 
> 
> Diff: http://git.reviewboard.kde.org/r/111008/diff/
> 
> 
> Testing
> -------
> 
> Works for me.
> 
> 
> Thanks,
> 
> Frank Reininghaus
> 
>

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


More information about the kfm-devel mailing list