GNOME Bugzilla – Bug 574121
reduce gconf roundtrips at startup
Last modified: 2010-01-21 21:54:58 UTC
metacity tries to do the right thing, by preloading all the relevant directories before getting the keys one-by-one, but GConfClient isn't actually smart enough to avoid server roundtrips in this case. That should certainly be fixed in GConf. In the meantime, here is a patch that reworks the metacity prefs initialization to avoid roundtrips for individual keys anyway, by using gconf_client_all_keys(). It also saves some lines: prefs.c | 148 +++++++++++++++++++++++++++------------------------------------- 1 file changed, 63 insertions(+), 85 deletions(-)
Created attachment 130037 [details] [review] patch
wow, is the recursive pre-load not working at all ? that's a tad sad - I guess we should look at that too; or is it that there are several overlapping recursive pre-loads there (?). Patch looks lovely though.
The preload is working for the keys which _are_ in the database, like /apps/metacity/global_keybindings/run_command_1 but not for all the _list keys which are not. GConfClient should be smart enough to notice that if it preloaded a directory and has a watch on it, it can trust negative results from the cache. Similarly, gconf_client_all_entries() should not go out and get everything from the server again, in this case.
(In reply to comment #3) > > GConfClient should be smart enough to notice that if it preloaded a directory > and has a watch on it, it can trust negative results from the cache. This patch for "negative caching" never got included/tested AFAIK: http://mail.gnome.org/archives/performance-list/2007-April/msg00051.html Or are we talking about different things? :)
No that pretty much covers what I mean. Thanks for saving me from reimplementing it !
Review of attachment 130037 [details] [review]: Looks good and appears to work; committed.
FIXED.