xfce-mcs-manager -> suggest signal poll interval == 1s

Kok, Auke sofar at foo-projects.org
Thu May 24 07:44:16 CEST 2007


All,

I suggest making the following change to xfce-mcs-manager.c:

--- xfce-mcs-manager.c-org      2007-05-23 22:27:15.000000000 -0700
+++ xfce-mcs-manager.c  2007-05-23 22:21:39.000000000 -0700
@@ -454,7 +454,7 @@ main (int argc, char **argv)
          g_message ("Daemon mode disabled (for debug purpose only!)");

      /* Establish signal-check timer */
-    g_timeout_add (500, (GSourceFunc) check_signal_state, NULL);
+    g_timeout_add (1000, (GSourceFunc) check_signal_state, NULL);

      gtk_main ();


The reason to do this is that on laptops, this reduces the amount of polls by 
50% for xfce-mcs-manager. Reducing polls is good because it saves power, and in 
this case (on my laptop) reduces the amount of wakeups per second(wps) from idle 
by about 3% total, which is highly significant, something like 10-20 minutes 
more battery life!

Every wakeup costs power, so it's good to remove polling timers for mobile 
users. In a normal xfce session, xfce-mcs-manager is in it's current state the 
biggest(small, but still biggest xfce-) wps offender, so it makes sense to start 
cutting there first.

I didn't see any negative effect from the patch, everything responds (quitting 
etc.) as expected (fast).

To measure wps, I used powertop of course :) (http://www.linuxpowertop.org/)

The rest of the basic xfce environment is very decent, like I said before, most 
apps poll once a second (less would be better, or just not poll at all if 
possible), keep up the good work!

Auke




More information about the Xfce4-dev mailing list