Review Request 125251: KSycoca optimization: only watch the file if the app connects to databaseChanged()
David Faure
faure at kde.org
Wed Sep 16 06:53:50 UTC 2015
> On Sept. 15, 2015, 11:36 p.m., Albert Astals Cid wrote:
> > src/sycoca/ksycoca.cpp, line 721
> > <https://git.reviewboard.kde.org/r/125251/diff/1/?file=404223#file404223line721>
> >
> > Would it make more sense to only add the watcher here? i.e remove the watcher code from findDatabase and remove the else here?
No, we also want to support closing + reopening the database later on (e.g. due to the db having changed).
Of course in general this doesn't change the path to the DB, but findDatabase supports using a global sycoca db initially and later on switching to a local one (old feature to speed up login for first-time users on 10000 users systems). I haven't really tested the global sycoca db situation but at least this is trying to not break it too much.
So my thinking was, we need to watch the file in findDatabase for the case of
open (global), connectNotify, close, open (local).
- David
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125251/#review85472
-----------------------------------------------------------
On Sept. 15, 2015, 11:01 p.m., David Faure wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/125251/
> -----------------------------------------------------------
>
> (Updated Sept. 15, 2015, 11:01 p.m.)
>
>
> Review request for KDE Frameworks and Albert Astals Cid.
>
>
> Repository: kservice
>
>
> Description
> -------
>
> KSycoca optimization: only watch the file if the app connects to databaseChanged()
>
>
> Diffs
> -----
>
> src/sycoca/ksycoca.h cec43a4431cd90e1590f50bf8424f395541a0847
> src/sycoca/ksycoca.cpp 205d00c14e330db719acf091f5206fdb519d4c63
> src/sycoca/ksycoca_p.h dcd788ce9c3fd45e0a04ee936f4dbdd2e4cd872b
>
> Diff: https://git.reviewboard.kde.org/r/125251/diff/
>
>
> Testing
> -------
>
> Unit tests still pass (including those who do connect to that signal).
>
>
> Thanks,
>
> David Faure
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20150916/7e54ba51/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list