D11282: less expensive findByUrl in KCoreDirListerCache
Jaime Torres Amate
noreply at phabricator.kde.org
Tue Mar 13 11:09:56 UTC 2018
jtamate created this revision.
jtamate added reviewers: Frameworks, dfaure.
Restricted Application added a project: Frameworks.
jtamate requested review of this revision.
REVISION SUMMARY
From O(n) in the worst case to at most Log2(n) + O(1) comparisons.
Unfortunately, fetching the files in a directory is now a little more expensive.
CCBUG: 320231
TEST PLAN
findByUrl was slow, for example, renaming 50.000 small files, it has to go through a list of 50.000 items 50.000 times, so renaming that number of files takes more than an hour, now it takes less time, but baloo re-scanning and the dirlister re-scanning the directory doesn't help to reduce the time.
Moving 50.000 small files from sftp://127.0.0.1/borrar to /borrar1, the first step, fetching data from the dirlister took more than 1 minute, now it is instantaneous.
REPOSITORY
R241 KIO
REVISION DETAIL
https://phabricator.kde.org/D11282
AFFECTED FILES
src/core/kcoredirlister.cpp
To: jtamate, #frameworks, dfaure
Cc: michaelh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180313/6e3f4f2a/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list