D24502: Replace recursion in FilteredDirIterator with loop iteration
This revision was automatically updated to reflect the committed changes. Closed by commit R293:3319b6656043: Replace recursion in FilteredDirIterator with loop iteration (authored by bruns). REPOSITORY R293 Baloo CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D24502?vs=67506=67569 REVISION DETAIL https://phabricator.kde.org/D24502 AFFECTED FILES src/file/filtereddiriterator.cpp To: bruns, #baloo, ngraham, astippich Cc: kde-frameworks-devel, lots0logs, LeGast00n, fbampaloukas, GB_2, domson, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams
D24502: Replace recursion in FilteredDirIterator with loop iteration
ngraham accepted this revision. ngraham added a comment. This revision is now accepted and ready to land. This makes sense to me. REPOSITORY R293 Baloo BRANCH iterative_filtereddiriterator REVISION DETAIL https://phabricator.kde.org/D24502 To: bruns, #baloo, ngraham, astippich Cc: kde-frameworks-devel, lots0logs, LeGast00n, fbampaloukas, GB_2, domson, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams
D24502: Replace recursion in FilteredDirIterator with loop iteration
bruns added reviewers: ngraham, astippich. REPOSITORY R293 Baloo REVISION DETAIL https://phabricator.kde.org/D24502 To: bruns, #baloo, ngraham, astippich Cc: kde-frameworks-devel, lots0logs, LeGast00n, fbampaloukas, GB_2, domson, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams
D24502: Replace recursion in FilteredDirIterator with loop iteration
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