Review Request: Implemented multithreading in KFileItemModelSortAlgorithm

Frank Reininghaus frank78ac at googlemail.com
Fri Oct 26 11:25:31 BST 2012


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



dolphin/src/kitemviews/private/kfileitemmodelsortalgorithm.cpp
<http://git.reviewboard.kde.org/r/107025/#comment16479>

    This if (...) isn't needed here. The same check is done again in parallelSort().



dolphin/src/kitemviews/private/kfileitemmodelsortalgorithm.cpp
<http://git.reviewboard.kde.org/r/107025/#comment16480>

    This may look like nitpicking ;-) But I really prefer to have the sequentialSort() call in an else branch and remove the return above, to improve readability. When I first looked at this function, it looked to me like sequantialSort() is called in every case.


- Frank Reininghaus


On Oct. 25, 2012, 7:42 p.m., Emmanuel Pescosta wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/107025/
> -----------------------------------------------------------
> 
> (Updated Oct. 25, 2012, 7:42 p.m.)
> 
> 
> Review request for Dolphin and Frank Reininghaus.
> 
> 
> Description
> -------
> 
> Implemented multithreading in KFileItemModelSortAlgorithm.
> 
> If more than 100 items to sort and ideal thread count is greater than 1 -> sort them with parallelSort (2 Threads)
> 
> Use maximal 2 Threads, because more than 2 Threads are "slower" (more overhead than speed up). (I also have a patch which uses n Threads for sorting, if you want test it ;)
> 
> 
> Diffs
> -----
> 
>   dolphin/src/kitemviews/private/kfileitemmodelsortalgorithm.h 3a596df 
>   dolphin/src/kitemviews/private/kfileitemmodelsortalgorithm.cpp e0aac13 
> 
> Diff: http://git.reviewboard.kde.org/r/107025/diff/
> 
> 
> Testing
> -------
> 
> About 2 seconds faster with sorting 500.000 files.
> About 5 seconds faster with sorting 1.000.000 files.
> 
> 
> Thanks,
> 
> Emmanuel Pescosta
> 
>

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


More information about the kfm-devel mailing list