DBus menu is very slow when using large menu
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
DBus Menu |
Fix Released
|
Medium
|
Ted Gould | ||
libdbusmenu (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Chrome tries to expose the user's bookmarks via GTK. We found that our app startup could take multiple minutes (!) for users that had a lot of bookmarks.
http://
http://
Some more technical details: because we have a weird custom menu, what we do is build a hidden GtkMenu that we insert all of our bookmarks in. The call stack when the code is hung looks like this:
Thread 1 (Thread 0xb62bb870 (LWP 31589)):
#0 0xb6f5307e in ?? () from /usr/lib/
#1 0xb6f4fb53 in g_value_init () from /usr/lib/
#2 0xaf66d70e in dbusmenu_
#3 0xaf66d9c6 in ?? () from /usr/lib/
#4 0xb6e7a1a9 in g_list_foreach () from /lib/i386-
#5 0xaf66d9e9 in ?? () from /usr/lib/
#6 0xb6e7a1a9 in g_list_foreach () from /lib/i386-
#7 0xaf66d9e9 in ?? () from /usr/lib/
#8 0xb6e7a1a9 in g_list_foreach () from /lib/i386-
#9 0xaf66d9e9 in ?? () from /usr/lib/
#10 0xb6e7a1a9 in g_list_foreach () from /lib/i386-
#11 0xaf66d9e9 in ?? () from /usr/lib/
#12 0xb6e7a1a9 in g_list_foreach () from /lib/i386-
#13 0xaf66d9e9 in ?? () from /usr/lib/
#14 0xaf66f901 in dbusmenu_
#15 0xaf67241b in ?? () from /usr/lib/
#16 0xaf672e3d in ?? () from /usr/lib/
#17 0xb66c85b2 in ?? () from /usr/lib/
#18 0xb6e7a311 in ?? () from /lib/i386-
#19 0xb6e7eaa8 in g_main_
#20 0xb6e7f270 in ?? () from /lib/i386-
#21 0xb6e7f524 in g_main_
#22 0x0879f259 in base::MessagePu
We're going to disable this code for now. We'll put the bookmarks menu code behind a flag, so that you can test any fixes to this bug against trunk Chrome by running with that flag, and once this code is performant we'll reenable it. In general, it's really bad for startup performance to put this in the critical path of startup; it'd be nice if we could do this on a background thread.
Related branches
- Charles Kerr (community): Approve
-
Diff: 167 lines (+55/-7)1 file modifiedlibdbusmenu-glib/server.c (+55/-7)
- 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 dbusmenu: | |
status: | New → Triaged |
importance: | Undecided → Medium |
assignee: | nobody → Ted Gould (ted) |
Changed in dbusmenu: | |
status: | Triaged → Fix Committed |
Changed in dbusmenu: | |
status: | Fix Committed → Fix Released |
I don't have a Natty install at the moment, but I'll point out that depending on disk contention, the bookmark menu code can potentially send two 16x16 icons for each bookmark menu item (set default favicon since favicon database hasn't async loaded yet, set the real favicon after database).
So for 100 bookmarks * 16x16 icon * 4 bytes a pixel is 800kb for one pass, 1.5 megs for both passes. Is that a problem for dbus?