GNOME Bugzilla – Bug 570615
wait less time for X ...
Last modified: 2009-07-17 02:49:04 UTC
So - most likely this breaks some setups; and I guess it would be nice to have some more central fall-back / growing interval timer instead of this [ a linear ramp would prolly do it nicely ]. I also merge the two (rather similar) idle_connect_for_display things and move them into the gdm-slave module - even though (it seems) they were moved out of there a while back [ judging from the left-over, unsused MAX_CONNECTIONS thingit ]. Anyhow, comments much appreciated, and I'll try to clean it up - this saves ~450ms on boot with autologin for me. HTH, Michael.
Created attachment 127998 [details] [review] patch
So looking at this... There are two places we call idle_connect_to_display: a) If the display is local b) If the display is remote Case a) is the normal case that you're hitting with autologin. We actually do... 1. Start X server in a special way to have it tell us when it's ready 2. Wait for it to tell us it's ready 3. Queue a timeout to connect to it a half second later 3. is dumb. It told us it's ready. It's not lying to us. We should just connect right away, not 500ms later, not 50ms later.
I ended up committing this smaller patch: commit 2ca2209c18b6659c8282039732bb62436779db55 Author: Ray Strode <rstrode@redhat.com> Date: Thu Jul 16 22:47:53 2009 -0400 Don't wait 1/2sec before connecting to display It told us it's ready so let's not waste time. See bug http://bugzilla.gnome.org/show_bug.cgi?id=570615 diff --git a/daemon/gdm-simple-slave.c b/daemon/gdm-simple-slave.c index 948886f..72efdfd 100644 --- a/daemon/gdm-simple-slave.c +++ b/daemon/gdm-simple-slave.c @@ -1033,7 +1033,7 @@ static void on_server_ready (GdmServer *server, GdmSimpleSlave *slave) { - g_timeout_add (500, (GSourceFunc)idle_connect_to_display, slave); + g_idle_add ((GSourceFunc)idle_connect_to_display, slave); } static void