D24502: Replace recursion in FilteredDirIterator with loop iteration
Stefan BrĂ¼ns
noreply at phabricator.kde.org
Tue Oct 8 15:14:43 BST 2019
bruns created this revision.
bruns added a reviewer: Baloo.
Herald added projects: Frameworks, Baloo.
Herald added a subscriber: kde-frameworks-devel.
bruns requested review of this revision.
REVISION 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
REPOSITORY
R293 Baloo
BRANCH
iterative_filtereddiriterator
REVISION DETAIL
https://phabricator.kde.org/D24502
AFFECTED FILES
src/file/filtereddiriterator.cpp
To: bruns, #baloo
Cc: kde-frameworks-devel, lots0logs, LeGast00n, fbampaloukas, GB_2, domson, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20191008/b848be01/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list