bruns created this revision. bruns added reviewers: Baloo, ngraham. Herald added projects: Frameworks, Baloo. Herald added a subscriber: kde-frameworks-devel. bruns requested review of this revision.
REVISION SUMMARY In case an OrPostingIterator is below and AndPostingIterator, which is the common case when using atleast two term, most of the documents will be skipped. Instead of skipping by repeatedly calling OrPostingIterator::next() implement the skipTo method. This removes the overhead of looping over the subsets for each next call. When skipTo is implemented in the AndPostingIterator and OrPostingIterator, the instruction count is significantly reduced, e.g. a query for "the fox" goes down from 20M to 4.5M instructions (query time 6ms vs 1.5ms), on a DB with 4.600 documents. Depends on D28839 <https://phabricator.kde.org/D28839> TEST PLAN - ctest - valgrind baloosearch some words REPOSITORY R293 Baloo BRANCH submit REVISION DETAIL https://phabricator.kde.org/D28845 AFFECTED FILES src/engine/orpostingiterator.cpp src/engine/orpostingiterator.h To: bruns, #baloo, ngraham Cc: kde-frameworks-devel, hurikhan77, lots0logs, LeGast00n, cblack, fbampaloukas, domson, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams