hud-service sends insane number of dbus messages

Bug #957022 reported by Allison Karlitskaya
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Application Menu Indicator
Fix Released
High
Charles Kerr
indicator-appmenu (Ubuntu)
Fix Released
High
Charles Kerr

Bug Description

An absolutely massive number of dbus messages are sent as a result of the user pressing:

  <alt> <u> <alt>

(ie: opening the hud, doing a single-letter query, closing the hud).

Some checking with dbus-monitor shows this to be about 400 messages.

This got a lot worse recently as a result of sending "opened"/"closed" messages to every single dbusmenu submenu on the entire system (active window + system indicators + appindicators) as a result of doing each search.

We have some ideas for reducing this:

a) Unity send 'CloseQuery' followed by 'StartQuery' on each keystroke of the search. hud-service immediately closes the menus on 'CloseQuery' just to re-open them again on the next 'StartQuery'. There are two ways we can fix this. First is to modify the dbus protocol to have a method to change the query string without destroying it. Second is to have a short timeout in the HUD to prevent the items from being immediately closed (in case another query comes soon).

b) dbusmenu should provide some mechanism of knowing when "opened"/"closed"/about-to-show is not necessary so we can skip it for clients that will ignore it anyway.

c) dbusmenu client should merge events -- if we send a whole batch of "opened" messages to a single client in one mainloop iteration then it should use an idle to send them out as a single messages

d) we should stop requesting dbus method call replies when we don't need them -- this may require a GLib patch

We need to track our progress. The number of dbus messages involved can be measured like so:

 - open a terminal
 - open the hud and do a search, just to make sure the terminal's menus are precached
 - dbus-monitor &> logfile
 - <alt> u <alt>
 - ^C
 - grep '^[^ ]' logfile | wc -l

the last line takes advantage of the fact that each non-indented line in the logfile represents a single message (with the indented lines giving details).

Related branches

Changed in indicator-appmenu (Ubuntu):
importance: Undecided → High
milestone: none → ubuntu-12.04-beta-2
Revision history for this message
Allison Karlitskaya (desrt) wrote :

Okay. '(a)' is fixed in the hud-rewrite branch. It doesn't have much impact on the single-letter case, but it has a huge impact on multi-letter searches.

Revision history for this message
Allison Karlitskaya (desrt) wrote :
Olli Ries (ories)
Changed in indicator-appmenu:
importance: Undecided → High
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in indicator-appmenu (Ubuntu):
status: New → Confirmed
Changed in indicator-appmenu (Ubuntu):
assignee: nobody → Canonical Desktop Experience Team (canonical-dx-team)
milestone: ubuntu-12.04-beta-2 → ubuntu-12.04
tags: added: rls-mgr-p-tracking
Charles Kerr (charlesk)
Changed in indicator-appmenu:
status: In Progress → Fix Committed
David Barth (dbarth)
Changed in indicator-appmenu (Ubuntu):
status: Confirmed → Fix Committed
Changed in indicator-appmenu:
assignee: nobody → Charles Kerr (charlesk)
Changed in indicator-appmenu (Ubuntu):
assignee: Canonical Desktop Experience Team (canonical-dx-team) → Charles Kerr (charlesk)
Revision history for this message
Allison Karlitskaya (desrt) wrote :

It's my opinion that this issue is substantially improved, but not yet fixed.

Items 'a', 'c', 'd' have all been fixed, but item 'b' is still outstanding.

Charles Kerr (charlesk)
Changed in indicator-appmenu:
status: Fix Committed → Fix Released
Changed in indicator-appmenu (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.