Review Request: Implemented multithreading in KFileItemModelSortAlgorithm

Frank Reininghaus frank78ac at googlemail.com
Mon Oct 29 07:34:22 GMT 2012



> On Oct. 28, 2012, 7:49 p.m., Mark Gaiser wrote:
> > I just saw one issue in the code that you probably forget to update.
> > The KFileItemModelSortAlgorithm::sequentialSort function has calls to "sort". That used to be fine, but the sort function is now following the parallelSort path. I think you have to change the two "sort" calls in KFileItemModelSortAlgorithm::sequentialSort to "sequentialSort". Right now everything ends up using parallelSort unless i'm reading it wrong..
> 
> Emmanuel Pescosta wrote:
>     Oh ... Yes you are right ... I will fix it ;)
> 
> Emmanuel Pescosta wrote:
>     Am I allowed to push the small change without review request?
>     
>     Old:
>     
>     sort(model, begin, middle);
>     sort(model, middle, end);
>     
>     New:
>     
>     sequentialSort(model, begin, middle);
>     sequentialSort(model, middle, end);
> 
> Mark Gaiser wrote:
>     I would say yes, but i'm not the dolphin maintainer. Wait till Frank comes by again and gives you another ship it.

Good catch! It is so obvious that this makes sense (even though we've all missed it, hehe) that I'd say that you could have even pushed it without asking. Thanks!


- Frank


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


On Oct. 26, 2012, 7:17 p.m., Emmanuel Pescosta wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/107025/
> -----------------------------------------------------------
> 
> (Updated Oct. 26, 2012, 7:17 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/20121029/b4c6abf1/attachment.htm>


More information about the kfm-devel mailing list