ServiceOwnerChanged wakes up everybody?

Anders Carlsson andersca at imendio.com
Thu Jun 9 04:42:37 PDT 2005


Kimmo.Hamalainen at nokia.com wrote:

>Hi,
>
>We were monitoring processes' CPU usage in the coming Nokia 770
>internet tablet that extensively uses D-BUS and we found that
>every process on the bus is woken up when some process enters
>or leaves the bus. So it seems that the ServiceOwnerChanged,
>and ServiceDeleted signals are always delivered to everybody
>even if they are not AddMatched for. Is this a bug or desirable
>behaviour? I think 95% of the processes don't use this information.
>
>BR, Kimmo
>  
>
Hello Kimmo,

are you sure this is not because of the GConf or Gnome-VFS d-bus ports,
because they listen for those events (at least ServiceOwnerChanged)
because they need to know when the daemons disappear. The problem is
that it's not possible to only listen to ServiceOwnerChanged for just
certain services.

I've whipped up a patch that adds a "detail" argument to messages. This
argument can be used to match both signals and messages. For
ServiceOwnerChanged, the message detail contains the name of the
service, making it easy to match only the needed messages.

Havoc, John, what do you think about this patch?

Anders
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dbus-message-detail.diff
Type: text/x-patch
Size: 11509 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20050609/70b4fd47/dbus-message-detail.bin


More information about the dbus mailing list