Skip to content
Commit 630939e3 authored by Vishesh Handa's avatar Vishesh Handa
Browse files

FileIndexer: Do not use QDirIterators in the queues

A DirIterator works by opening the directory (as a file) and reading its
contents, which are the list of files in that directory. As long as the
dirIterator is open, it consumes one file descriptor.

When iterating over all the folders, by using QDirIterator, we open a
new file descriptor per directory. Since we traverse the file system via
breadth first, the number of valid QDirIterators can get quite high.
This sometimes results in us exceeding the number of file descriptors
required which results in a crash, cause QProcess doesn't handle running
out of file descriptors.

Instead we now just iterate over all the directories and store them as
strings. This may consume more memory, but it is better than a crash.

BUG: 310777
REVIEW: 108950
parent 498ec7c0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment