PropertiesChanged signal
Stef Walter
stef-list at memberwebs.com
Fri May 7 12:31:38 PDT 2010
On 2010-05-07 13:03, David Zeuthen wrote:
> On Fri, May 7, 2010 at 1:46 PM, Lennart Poettering <mzqohf at 0pointer.de> wrote:
>> Hmm, could we extend the spec a little and say that a PropertiesChanged
>> signal with an empty dict means "some property changed"? I know quite a
>> few projects which have something like this (and for a reason, since the
>> property data is big and more often not read than it is read), including
>> some of my own. This minor extension to your suggestion would allow me
>> to follow your spec without a headache of sending more data over the bus
>> than necessary.
>
> First, I would strongly suggest that you only do this after carefully
> measuring whether performance really is an issue. Because... the world
> is just a better place if it's very easy to create a proxy that
> properly tracks a remote object without having to add specific code to
> handle properties.
As an example, use of the this signal in gnome-keyring would run into
exactly that problem, where calculating the value of property takes a
fair amount of work (think crypto).
But in the end, it may be that gnome-keyring's DBus APIs can't use this
new signal anyway:
We have different values for the same property depending on who the
caller is.
A signal that let us broadcast that some property changed, but not send
the value along would be ideal. However I realize this is not how most
services use signals.
Cheers,
Stef
More information about the dbus
mailing list