I've noticed for the last few days that whilst running Thunderbird Daily, dbus-daemon will use a lot of CPU for a few minutes every now and again and power consumption goes through the roof. When I look at traffic on the session bus, I see thousands of these messages from Thunderbird:
What is happening is that each time we look for the system proxy settings, we are calling g_settings_new(). When doing this, the dconf backend sets up a watch on these settings to be notified of change events.
Of course, there might actually be a Thunderbird bug here, but we can probably improve this situation in nsUnixSystemProxySettings by not creating a new GSettings instance (and not setting up a new watch) each time we look up the proxy settings.
I've noticed for the last few days that whilst running Thunderbird Daily, dbus-daemon will use a lot of CPU for a few minutes every now and again and power consumption goes through the roof. When I look at traffic on the session bus, I see thousands of these messages from Thunderbird:
method call sender=:1.527 -> dest=org. freedesktop. DBus serial=34074 path=/org/ freedesktop/ DBus; interface= org.freedesktop .DBus; member=AddMatch signal' ,interface= 'ca.desrt. dconf.Writer' ,path=' /ca/desrt/ dconf/Writer/ user',arg0path= '/system/ proxy/' "
string "type='
What is happening is that each time we look for the system proxy settings, we are calling g_settings_new(). When doing this, the dconf backend sets up a watch on these settings to be notified of change events.
Of course, there might actually be a Thunderbird bug here, but we can probably improve this situation in nsUnixSystemPro xySettings by not creating a new GSettings instance (and not setting up a new watch) each time we look up the proxy settings.