D28843: [AndPostingIterator] Replace recursive next() implementation

2020-04-15 Thread Stefan Brüns
This revision was automatically updated to reflect the committed changes.
Closed by commit R293:5d20560ef6d6: [AndPostingIterator] Replace recursive 
next() implementation (authored by bruns).

REPOSITORY
  R293 Baloo

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D28843?vs=80160=80233

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

AFFECTED FILES
  src/engine/andpostingiterator.cpp
  src/engine/andpostingiterator.h

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


D28843: [AndPostingIterator] Replace recursive next() implementation

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/D28843

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


D28843: [AndPostingIterator] Replace recursive next() implementation

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
  The next() call will recurse once for each document in the first set
  until all iterators align, which is especially bad when the first term
  is common. It will only advance the first iterator just by one, although
  it could skip to the largest id in the set.
  
  Use skipTo on each iterator until none of the iterators moves forward,
  and in case the iterator has moved use the new position as new lower
  bound. If one of of the iterators only contains a small set, the
  iterators on average will be moved much further in each round.
  
  As skipTo(...) and next() are mostly identical with this approach next()
  can be trivially implemented with skipTo.
  
  Depends on D28839 

REPOSITORY
  R293 Baloo

BRANCH
  submit

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

AFFECTED FILES
  src/engine/andpostingiterator.cpp
  src/engine/andpostingiterator.h

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