hud-service sends insane number of dbus messages
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"
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
- Charles Kerr (community): Approve
-
Diff: 1250 lines (+843/-62)8 files modified.bzrignore (+2/-0)
docs/libdbusmenu-glib/reference/libdbusmenu-glib-sections.txt (+1/-0)
libdbusmenu-glib/client.c (+446/-45)
libdbusmenu-glib/client.h (+6/-0)
libdbusmenu-glib/dbus-menu.xml (+46/-0)
libdbusmenu-glib/server.c (+176/-17)
tests/Makefile.am (+24/-0)
tests/test-glib-events-nogroup-client.c (+142/-0)
- Ken VanDine: Pending requested
-
Diff: 11864 lines (+11365/-22)62 files modifiedChangeLog (+32/-0)
configure (+11/-11)
configure.ac (+3/-3)
debian/changelog (+10/-0)
docs/libdbusmenu-glib/reference/html/annotation-glossary.html (+83/-0)
docs/libdbusmenu-glib/reference/html/api-index-deprecated.html (+31/-0)
docs/libdbusmenu-glib/reference/html/api-index-full.html (+593/-0)
docs/libdbusmenu-glib/reference/html/ch01.html (+50/-0)
docs/libdbusmenu-glib/reference/html/index.html (+49/-0)
docs/libdbusmenu-glib/reference/html/index.sgml (+176/-0)
docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuClient.html (+607/-0)
docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuMenuitem.html (+1893/-0)
docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuMenuitemProxy.html (+166/-0)
docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuServer.html (+412/-0)
docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-Types.html (+276/-0)
docs/libdbusmenu-glib/reference/html/libdbusmenu-glib.devhelp2 (+161/-0)
docs/libdbusmenu-glib/reference/html/object-tree.html (+32/-0)
docs/libdbusmenu-glib/reference/html/style.css (+266/-0)
docs/libdbusmenu-glib/reference/tmpl/client.sgml (+228/-0)
docs/libdbusmenu-glib/reference/tmpl/menuitem-proxy.sgml (+59/-0)
docs/libdbusmenu-glib/reference/tmpl/menuitem.sgml (+721/-0)
docs/libdbusmenu-glib/reference/tmpl/server.sgml (+171/-0)
docs/libdbusmenu-glib/reference/tmpl/types.sgml (+109/-0)
docs/libdbusmenu-glib/reference/version.xml (+1/-1)
docs/libdbusmenu-glib/reference/xml/annotation-glossary.xml (+80/-0)
docs/libdbusmenu-glib/reference/xml/api-index-deprecated.xml (+8/-0)
docs/libdbusmenu-glib/reference/xml/api-index-full.xml (+153/-0)
docs/libdbusmenu-glib/reference/xml/client.xml (+448/-0)
docs/libdbusmenu-glib/reference/xml/menuitem-proxy.xml (+114/-0)
docs/libdbusmenu-glib/reference/xml/menuitem.xml (+1331/-0)
docs/libdbusmenu-glib/reference/xml/server.xml (+309/-0)
docs/libdbusmenu-glib/reference/xml/types.xml (+192/-0)
docs/libdbusmenu-gtk/reference/html/annotation-glossary.html (+47/-0)
docs/libdbusmenu-gtk/reference/html/api-index-deprecated.html (+31/-0)
docs/libdbusmenu-gtk/reference/html/api-index-full.html (+119/-0)
docs/libdbusmenu-gtk/reference/html/ch01.html (+45/-0)
docs/libdbusmenu-gtk/reference/html/index.html (+44/-0)
docs/libdbusmenu-gtk/reference/html/index.sgml (+43/-0)
docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-DbusmenuGtkClient.html (+347/-0)
docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-DbusmenuGtkMenu.html (+187/-0)
docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-menuitem.html (+274/-0)
docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-parser.html (+118/-0)
docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk.devhelp2 (+38/-0)
docs/libdbusmenu-gtk/reference/html/object-tree.html (+32/-0)
docs/libdbusmenu-gtk/reference/html/style.css (+266/-0)
docs/libdbusmenu-gtk/reference/tmpl/client.sgml (+110/-0)
docs/libdbusmenu-gtk/reference/tmpl/menu.sgml (+56/-0)
docs/libdbusmenu-gtk/reference/tmpl/menuitem.sgml (+86/-0)
docs/libdbusmenu-gtk/reference/tmpl/parser.sgml (+42/-0)
docs/libdbusmenu-gtk/reference/version.xml (+1/-1)
docs/libdbusmenu-gtk/reference/xml/annotation-glossary.xml (+32/-0)
docs/libdbusmenu-gtk/reference/xml/api-index-deprecated.xml (+8/-0)
docs/libdbusmenu-gtk/reference/xml/api-index-full.xml (+32/-0)
docs/libdbusmenu-gtk/reference/xml/client.xml (+238/-0)
docs/libdbusmenu-gtk/reference/xml/menu.xml (+133/-0)
docs/libdbusmenu-gtk/reference/xml/menuitem.xml (+178/-0)
docs/libdbusmenu-gtk/reference/xml/parser.xml (+77/-0)
libdbusmenu-glib/enum-types.h (+1/-1)
libdbusmenu-glib/enum-types.h.in (+1/-1)
libdbusmenu-gtk/genericmenuitem-enum-types.h (+1/-1)
libdbusmenu-gtk/genericmenuitem-enum-types.h.in (+1/-1)
libdbusmenu-gtk/genericmenuitem.c (+2/-2)
Changed in indicator-appmenu (Ubuntu): | |
importance: | Undecided → High |
milestone: | none → ubuntu-12.04-beta-2 |
Changed in indicator-appmenu: | |
importance: | Undecided → High |
status: | New → In Progress |
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 |
Changed in indicator-appmenu: | |
status: | In Progress → Fix Committed |
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) |
Changed in indicator-appmenu: | |
status: | Fix Committed → Fix Released |
Changed in indicator-appmenu (Ubuntu): | |
status: | Fix Committed → Fix Released |
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.