← Back to team overview

ayatana-commits team mailing list archive

Re: [Merge] lp:~bratsche/appmenu-gtk/almost-rewrite into lp:appmenu-gtk

 

Forgive me if I don't know exactly how libappmenu is going to be used - it's not mentioned anywhere in any of the distributed files ;-) From the looks I'd say it was the gtk module that we load into all apps to export the menu on the bus? My comments are based on that at least :-)

I am a bit worried about the NameOwnerChanged signal around line 100... The way you listen for it the process will wake up each time anyone joins or leaves the bus, or any time anyone changes anything with the naming on the bus. So if this is done by all apps linking to gtk it may be a problem.

It's not like these event are very frequent, but they do happen every now and then. The times where we have then en masse is on shutdown and startup. But still just for a regularly running desktop it may have an impact on app startup time - I'm not sure how much though.

Sadly there is no easy fix though. There is a laborious fix :-) That would be manually installing a filter func in libdbus and then adding a MatchRule (with org.freedesktop.DBus.AddMatch) like : 

  type='signal',sender='org.freedesktop.DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged'arg0='WATCHED_NAME',arg2=''

which matches only when WATCHED_NAME drops off. For an example of playing around with samething like this see http://bazaar.launchpad.net/~unity-team/dee/trunk/annotate/head:/dee/dee-peer.c#L693


-- 
https://code.launchpad.net/~bratsche/appmenu-gtk/almost-rewrite/+merge/27638
Your team ayatana-commits is subscribed to branch lp:appmenu-gtk.



Follow ups

References