D11282: less expensive findByUrl in KCoreDirListerCache

Jaime Torres Amate noreply at phabricator.kde.org
Thu May 24 08:42:39 UTC 2018


jtamate added a comment.


  About the KCoreDirLister::Private::addNewItems method, benchmarking the current and sorted list implementation with 5000 fileItems:
  
  It only takes 1.5 msecs per iteration without filters and 1.9 msecs with a nameFilter and a mimeFilter.
  For reference, doing a std::partition of a copy of the list with isItemVisible also takes 1.5 msecs per iteration without filters and 1.4 with filters.

INLINE COMMENTS

> mwolff wrote in kcoredirlister.cpp:852
> is it OK that you operate on a copy of the item here? the item in the hash won't be modified, is that on purpose?

The item in the hash will be refreshed, but not the item returned.
This is not called when a rename is detected, therefore the key(url) is the same.

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D11282

To: jtamate, #frameworks, dfaure
Cc: kde-frameworks-devel, bruns, mwolff, michaelh, ngraham
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180524/f9e8da45/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list