Bug Fixes in KDE Base
kinotify: Do not store the paths to be added
kinotify used a QQueue<QByteArray> to store all the directories which
need to be added. Since we use QDirIterator, each path is presented as a
QString which is then encoded to its QByteArray (QFile::encodeName).
This results in *large* chunks of memory being allocated, and then
slowly being deallocated.
Instead, we now use a QDirIterator, and do not store all the directories
which need to be added, we simply iterate over them. This way we do not
allocate large amounts of memory.
There is a large performance improvement as well. On my system, with
38829 directories, adding all the watches now takes only about 10 seconds,
instead of about 65.
Patch possible due to massif output provided by Jure Repinc.
Thanks a lot.
tldr: Use DFS instead of BFS -> Less memory consumption
DIGEST: Fix massive memory leak in Nepomuk File Monitoring Service