I profiled this piece of junk. Console kit daemon spends more than 94% of its time in g_slist_find() at the top of this stack:
#0 0xb7f17db9 in IA__g_slist_find (list=0xa164ae0, data=0xa033210)
at /build/buildd/glib2.0-2.18.2/glib/gslist.c:574
#1 0xb800c5a9 in dbus_g_proxy_manager_filter (connection=0x9ed2f00, message=0xa1ee990, user_data=0x9ed5818)
at dbus-gproxy.c:1259
#2 0xb7fd20d5 in dbus_connection_dispatch () from /lib/libdbus-1.so.3
#3 0xb80035fd in message_queue_dispatch (source=0x9ed33d8, callback=0, user_data=0x0) at dbus-gmain.c:101
#4 0xb7ef86f8 in IA__g_main_context_dispatch (context=0x9ed2070)
at /build/buildd/glib2.0-2.18.2/glib/gmain.c:2144
#5 0xb7efbda3 in g_main_context_iterate (context=0x9ed2070, block=1, dispatch=1, self=0x9ecbc68)
at /build/buildd/glib2.0-2.18.2/glib/gmain.c:2778
#6 0xb7efc2c2 in IA__g_main_loop_run (loop=0x9edf1e0) at /build/buildd/glib2.0-2.18.2/glib/gmain.c:2986
#7 0x0804e586 in main (argc=1, argv=0xbff49834) at main.c:373
My suspicion is that c-k-d is adding dbus handlers and not removing them, so the list of proxies grows without bounds, and it must be walked every time a dbus message arrives. That's just a hunch though, and I haven't found the exact line of code where the root of the problem lies.
I profiled this piece of junk. Console kit daemon spends more than 94% of its time in g_slist_find() at the top of this stack:
#0 0xb7f17db9 in IA__g_slist_find (list=0xa164ae0, data=0xa033210) buildd/ glib2.0- 2.18.2/ glib/gslist. c:574 proxy_manager_ filter (connection= 0x9ed2f00, message=0xa1ee990, user_data= 0x9ed5818) _dispatch () from /lib/libdbus-1.so.3 queue_dispatch (source=0x9ed33d8, callback=0, user_data=0x0) at dbus-gmain.c:101 context_ dispatch (context=0x9ed2070) buildd/ glib2.0- 2.18.2/ glib/gmain. c:2144 context_ iterate (context=0x9ed2070, block=1, dispatch=1, self=0x9ecbc68) buildd/ glib2.0- 2.18.2/ glib/gmain. c:2778 buildd/ glib2.0- 2.18.2/ glib/gmain. c:2986
at /build/
#1 0xb800c5a9 in dbus_g_
at dbus-gproxy.c:1259
#2 0xb7fd20d5 in dbus_connection
#3 0xb80035fd in message_
#4 0xb7ef86f8 in IA__g_main_
at /build/
#5 0xb7efbda3 in g_main_
at /build/
#6 0xb7efc2c2 in IA__g_main_loop_run (loop=0x9edf1e0) at /build/
#7 0x0804e586 in main (argc=1, argv=0xbff49834) at main.c:373
My suspicion is that c-k-d is adding dbus handlers and not removing them, so the list of proxies grows without bounds, and it must be walked every time a dbus message arrives. That's just a hunch though, and I haven't found the exact line of code where the root of the problem lies.