Review Request 125185: KSycoca: replace DBus notification with file watching using KDirWatch.

David Faure faure at kde.org
Sun Sep 13 17:45:17 UTC 2015



> On Sept. 13, 2015, 5:24 p.m., Albert Astals Cid wrote:
> > > KDirWatch beats QFileSystemWatcher once again, after much fighting with QFSW
> > > with one failing unittest (KServiceTest::testThreads), I switched to KDirWatch
> > > and it worked immediately... 
> > 
> > Is that a problem for KDirWatch when it uses QFileSystemWatcher as a backend?

Good question. I tried (forcing kdirwatch to use QFSW), and it works fine. This is because KDirWatch monitors directories (whether with inotify directly or via QFSW), so it keeps getting notified of everything, while using QFSW directly to monitor *one file* seems to lose touch when the file is deleted+recreated many times.

Basically KDirWatch has sufficient logic on top of QFSW to make it work for this use case.
No point in replicating that logic in ksycoca though :-)


- David


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125185/#review85322
-----------------------------------------------------------


On Sept. 13, 2015, 4:26 p.m., David Faure wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/125185/
> -----------------------------------------------------------
> 
> (Updated Sept. 13, 2015, 4:26 p.m.)
> 
> 
> Review request for KDE Frameworks, Albert Astals Cid and Ben Cooksley.
> 
> 
> Repository: kservice
> 
> 
> Description
> -------
> 
> The list of changed resources is not longer available, so we fake it
> by passing all 4 resources. No big deal, it just removes a small optimization
> in some apps, and anyway the "apps" resource was emitted in all cases for the
> last 8 years anyway (vfolder bug that was never fixed).
> -> un-deprecate the old databaseChanged signal without the resource list ;)
> 
> KDirWatch beats QFileSystemWatcher once again, after much fighting with QFSW
> with one failing unittest (KServiceTest::testThreads), I switched to KDirWatch
> and it worked immediately...
> 
> REVIEW: 125185
> 
> 
> Diffs
> -----
> 
>   src/kbuildsycoca/CMakeLists.txt 8c9fd73a73e4fb40461448a9c324990fc16e2bc1 
>   src/kbuildsycoca/kbuildsycoca_main.cpp 4f39c470e474eaae6de9ade7ae5460edd6b00a82 
>   src/sycoca/ksycoca.h f529e59c18f14f3367695d7a1f5cee74ab36b43d 
>   src/sycoca/ksycoca.cpp 93514eebec0a7d3b59445e555adf1146a3a00060 
>   src/sycoca/ksycoca_p.h a7d91e6d89b726d336f99bf43a65c16166c1d48e 
> 
> Diff: https://git.reviewboard.kde.org/r/125185/diff/
> 
> 
> Testing
> -------
> 
> unittests still pass
> 
> 
> Thanks,
> 
> David Faure
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20150913/a0e5ed83/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list