Review Request 113515: Make KFileItemModel::createMimeData() faster, and ensure that the order of the URLs in the QMimeData object is the same as the order of the items in the view
Frank Reininghaus
frank78ac at googlemail.com
Fri Dec 6 00:15:05 GMT 2013
> On Nov. 30, 2013, 2:07 p.m., Emmanuel Pescosta wrote:
> > Looks good, thanks! :)
> >
> > Sorry for the late review, but I've been extremely busy for the last few weeks. (start of studies, new flat, ...)
Thanks for your comments! You are right about the const reference - replacing "const KFileItem" by "const KFileItem&" will be slightly more efficient here because it saves two updates of the KFileItemPrivate's atomic reference counter.
I hope that you feel at home in the new flat now, and I wish you all the best for your studies!
- Frank
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/113515/#review44882
-----------------------------------------------------------
On Oct. 30, 2013, 11:19 p.m., Frank Reininghaus wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/113515/
> -----------------------------------------------------------
>
> (Updated Oct. 30, 2013, 11:19 p.m.)
>
>
> Review request for Dolphin.
>
>
> Bugs: 283409
> http://bugs.kde.org/show_bug.cgi?id=283409
>
>
> Repository: kde-baseapps
>
>
> Description
> -------
>
> Note that the debugging output in DolphinView in this patch is not meant to be pushed to master, it's only there to make the effects of this patch easier to see.
>
> Selecting many items and copying them to the clipboard can take quite a bit of time, and the URLs in the clipboard are always sorted by name in ascending order, no matter how the files are sorted in the view. This is because we use KDirModel::simplifiedUrlList(urls) to remove child items from the list of URLs, and this function sorts the URLs internally to make it easier to find out which of them are child URLs.
>
> We can fix this quite easily now, because the selected indexes are now always stored in the view order, and this makes it easy to detect if an item is a child of the last item that has been added to the QMimeData.
>
>
> Diffs
> -----
>
> dolphin/src/kitemviews/kfileitemmodel.cpp 261b230
> dolphin/src/views/dolphinview.cpp d0a85b3
>
> Diff: http://git.reviewboard.kde.org/r/113515/diff/
>
>
> Testing
> -------
>
> The URLs in the QMimeData now appear in the same order as in the view.
>
> For benchmarking purposes, I pressed Ctrl+A and Ctrl+C in some folders on my hard drive and measured the time required to create the mime data with the DolphinView part of this patch (which is not meant to be pushed to master):
>
> /usr/include/ (374 items): 27 ms (master) -> 9 ms (patched)
>
> /usr/lib64 (3375 items): 210 ms -> 88 ms
>
> /usr/ in Details View, with /usr/bin/ (3541 items) and /usr/lib64/ expanded: 1258 ms -> 0 ms
>
> So the savings are particularly large when expanded folders are involved, but even in the other cases, this patch saves quite a bit of time.
>
>
> Thanks,
>
> Frank Reininghaus
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20131206/9c640156/attachment.htm>
More information about the kfm-devel
mailing list