> On Aug. 6, 2012, 10:31 a.m., Sebastian Trueg wrote: > > The reason for the queue was to avoid having the thread block until all > > folders are added. I fear that with this change starting the service and > > then shutting it down will always result in a forceful killing. Sure, for > > production use this is better in most cases...
I don't understand. How will it result in a forceful killing? The addition of watches is still being done asynchronously, 100 watches a time. Just like it was before, the only difference is that we're no longer storing the file paths in a queue. We're now storing the dir iterators. - Vishesh ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/105892/#review16958 ----------------------------------------------------------- On Aug. 6, 2012, 10:03 a.m., Vishesh Handa wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://git.reviewboard.kde.org/r/105892/ > ----------------------------------------------------------- > > (Updated Aug. 6, 2012, 10:03 a.m.) > > > Review request for Nepomuk and Sebastian Trueg. > > > Description > ------- > > 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 > <[email protected]>. > Thanks a lot. > > tldr: Use DFS instead of BFS -> Less memory consumption > > BUG: 304476 > > > This addresses bug 304476. > http://bugs.kde.org/show_bug.cgi?id=304476 > > > Diffs > ----- > > services/filewatch/kinotify.cpp e8843c8 > > Diff: http://git.reviewboard.kde.org/r/105892/diff/ > > > Testing > ------- > > kinotify tests pass successfully. > > > Thanks, > > Vishesh Handa > >
_______________________________________________ Nepomuk mailing list [email protected] https://mail.kde.org/mailman/listinfo/nepomuk
