D28845: [OrpostingIterator] Allow skipping elements, implement skipTo

2020-04-15 Thread Stefan Brüns
This revision was automatically updated to reflect the committed changes.
Closed by commit R293:4e7626c9488b: [OrpostingIterator] Allow skipping 
elements, implement skipTo (authored by bruns).

REPOSITORY
  R293 Baloo

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D28845?vs=80163&id=80235

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


D28845: [OrpostingIterator] Allow skipping elements, implement skipTo

2020-04-15 Thread Nathaniel Graham
ngraham accepted this revision.
This revision is now accepted and ready to land.

REPOSITORY
  R293 Baloo

BRANCH
  submit

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

To: bruns, #baloo, ngraham
Cc: kde-frameworks-devel, hurikhan77, lots0logs, LeGast00n, cblack, 
fbampaloukas, domson, ashaposhnikov, michaelh, astippich, spoorun, ngraham, 
bruns, abrahams


D28845: [OrpostingIterator] Allow skipping elements, implement skipTo

2020-04-14 Thread Stefan Brüns
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 

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