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
Please register or sign in to comment