Re: SoC idea: desktop file cache



Hey Colin,

On Thu, Mar 24, 2011 at 11:22 PM, Colin Walters <walters verbum org> wrote:
> The next question is how does the cache get rebuilt?  I think we
> basically need a system service with an inotify (GFileMonitor) watch
> on all those directories, and it takes care of rebuilding it.

Sounds good, but we really want a session-service [0] instead of a
system-service - otherwise it won't work with apps installed in
$HOME/.local or whatever $XDG_CONFIG_DIRS points to. With this, could
also implement this as a gnome-settings-daemon plug-in if you don't
want the overhead of another process. And you completely bypass the
nasty (and often overlooked) implications of dealing with two security
contexts instead of just one. And you also bypass other nasty problems
like $HOME on NFS or automount issues if you decide to fix this flaw
later by having the system daemon look in the users home...

Btw, if this service runs in the session, it can also be smart about
e.g. synthesizing desktop files for glick-style [1] applications
previously seen or downloaded or living in ~/Applications or
~/Downloads or something. Of course someone needs to come up with a
design for how runtime-less bundles should work but, at least, let's
not make it impossible from the get-go by implementing caching at the
system-level.

(On a machine with a one or two sessions at a time, the
session-instead-of-system approach has approximately the same
performance characteristics as the system-service approach. On
machines with many many sessions (Largo, FL terminal servers for
example) you might want to also have a system-wide cache that each
session can use. Could be it doesn't matter doing such a (premature)
optimization though.)

    David

[0] : you actually really want a service that is per (user, machine)
instead of per-session... this is easiest implemented by using the
D-Bus name org.service.<machine-id> on the session bus and using
storage in $HOME/.local/service/machine-<machine-id> for the cache

[1] : http://blogs.gnome.org/alexl/2007/08/07/experiments-with-runtime-less-app-bundles/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]