Revision a81f050...

Go back to digest for 12th August 2012

Bug Fixes in KDE Base

Vishesh Handa committed changes in [nepomuk-core/KDE/4.9] services/filewatch/kinotify.cpp:

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

REVIEW: 105892
DIGEST: Fix massive memory leak in Nepomuk File Monitoring Service

File Changes

Modified 1 files
  • services/filewatch/kinotify.cpp
1 files changed in total