D11827: Do not retrieve mtime from database repeatedly when sorting
Stefan Brüns
noreply at phabricator.kde.org
Sat Mar 31 04:01:08 UTC 2018
bruns created this revision.
Restricted Application added projects: Frameworks, Baloo.
Restricted Application added a subscriber: Frameworks.
bruns requested review of this revision.
REVISION SUMMARY
For larger result sets, querying the mtime (once for lhs and rhs each)
on each sorting step contributes significantly to the execution time.
Retrieve the mtime once for each document and use it for searching.
Test results:
$> build/bin/baloosearch -l 1 type=image
/home/stefan/DE15_Connector_Pinout.svg
Elapsed: 0.432438 msecs
$> baloosearch -l 1 type=image
/home/stefan/DE15_Connector_Pinout.svg
Elapsed: 3.66243 msecs
$> build/bin/baloosearch type=image | wc -l
Elapsed: 3.19816 msecs
1017
$> baloosearch type=image | wc -l
Elapsed: 7.45712 msecs
1017
Signed-off-by: Stefan Brüns <stefan.bruens at rwth-aachen.de>
REPOSITORY
R293 Baloo
BRANCH
searchstore_speedup_1
REVISION DETAIL
https://phabricator.kde.org/D11827
AFFECTED FILES
src/lib/searchstore.cpp
To: bruns
Cc: #frameworks, ashaposhnikov, michaelh, astippich, spoorun, ngraham, alexeymin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180331/e1764174/attachment.html>
More information about the Kde-frameworks-devel
mailing list