<table><tr><td style="">bruns created this revision.<br />Restricted Application added projects: Frameworks, Baloo.<br />Restricted Application added a subscriber: Frameworks.<br />bruns requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D11827">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>For larger result sets, querying the mtime (once for lhs and rhs each)<br />
on each sorting step contributes significantly to the execution time.<br />
Retrieve the mtime once for each document and use it for searching.</p>

<p>Test results:<br />
$> build/bin/baloosearch -l 1 type=image<br />
/home/stefan/DE15_Connector_Pinout.svg<br />
Elapsed: 0.432438 msecs</p>

<p>$> baloosearch -l 1 type=image<br />
/home/stefan/DE15_Connector_Pinout.svg<br />
Elapsed: 3.66243 msecs</p>

<p>$> build/bin/baloosearch  type=image | wc -l<br />
Elapsed: 3.19816 msecs<br />
1017</p>

<p>$> baloosearch  type=image | wc -l<br />
Elapsed: 7.45712 msecs<br />
1017</p>

<p>Signed-off-by: Stefan BrĂ¼ns <stefan.bruens@rwth-aachen.de></p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R293 Baloo</div></div></div><br /><div><strong>BRANCH</strong><div><div>searchstore_speedup_1</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D11827">https://phabricator.kde.org/D11827</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/lib/searchstore.cpp</div></div></div><br /><div><strong>To: </strong>bruns<br /><strong>Cc: </strong>Frameworks, ashaposhnikov, michaelh, astippich, spoorun, ngraham, alexeymin<br /></div>