-
Committer:
Stefan Brüns
-
Date:
2019-10-09 16:29:57 UTC
-
Revision ID:
git-v1:3319b66560432da2f53efb037fbcb60cfc4c4bfb
Replace recursion in FilteredDirIterator with loop iteration
Summary:
In case many consecutive files are skipped in a directory, the
recursive next() implementation recursed for every file, i.e.
calling itself repeatedly.
Instead, loop over all directory items until either a file or directory
is found which should be indexed, or there are no more items left.
Move the "shouldIndexHidden" variable out of the loop, as it is
invariant.
Test Plan: ctest -R filtereddiriterator
Reviewers: #baloo, ngraham, astippich
Reviewed By: #baloo, ngraham
Subscribers: kde-frameworks-devel
Tags: #frameworks, #baloo
Differential Revision: https://phabricator.kde.org/D24502