D11828: Simplify orPostingIterator and make it faster

Michael Heidelbach noreply at phabricator.kde.org
Sun Apr 8 09:22:16 UTC 2018


michaelh added a comment.


  I'm not very familiar with the concept of iterators (yet). To me it looks like `auto i = new OrPostingIterator(iters); i->docId();` will return 0 and `i->next()` returns a valid docId. After that `i->docId();` is also valid.
  Is this how iterators work? Naively I would expect `i->docId();` to be valid after construction or both `i->docId();` and `i->next()` to be invalid.
  
  I have to admit, it's very difficult to understand (and I don't, really) what baloo is doing here with all this iterating over vectors of inherited iterator classes, pointer-to-pointer stuff of which some might not even exist. My brain hurts, terribly! All I can presently do is ask some simple questions. Sorry, I'm of no help here. Please take my comments as a device for better understanding and I hope it's not to much of a bother.

REPOSITORY
  R293 Baloo

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

To: bruns, #baloo, michaelh
Cc: #frameworks, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, alexeymin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180408/b8f76e7c/attachment.html>


More information about the Kde-frameworks-devel mailing list