[PATCH] Make xfce4 start up faster
Brian J. Tarricone
bjt23 at cornell.edu
Mon Sep 15 11:05:09 CEST 2008
Hey all,
In case people are interested in progress on this, I've posted a
preliminary patch to the bug Auke created[1] that implements parallel
startup in xfce4-session.
It seems to work ok here (tho I haven't been brave enough to run it on
my desktop yet; just in a Xephyr sandbox), but I'm not entirely sure
everything will actually work properly. Need to set up some clients
that fail and test how it handles them, etc.
Anyhow, it could certainly use some testing -- one of the big things
now will be finding a good way to come up with a timeout value, since
the more apps that get started at once, the longer they'll take to get
to a point where they'll register with the session manager, so a
hard-coded timeout value (currently 8 seconds) may not be the best idea.
But anyway, I think this might be a good first cut at really getting
this working.
Give it a try... if you dare.
-b
[1] http://bugzilla.xfce.org/show_bug.cgi?id=4312
On Tue, 19 Aug 2008 14:07:32 -0700 Kok, Auke wrote:
>
> All, Brian,
>
> Arjan and me are working on making Xfce4 start up faster. As you know
> perhaps we're looking at having Xfce4 natively available or installed
> in the moblin2 distribution that we are currently working on, and
> startup time is a hot item.
>
> One of the issues we've found is that xfce4-session waits for each
> process to complete forking before starting the next part (xfdesktop,
> panel, thunar etc...). This part is easily acceleratable and cuts
> down startup time quite a bit, from like 2.5secs to 1.5secs or so, if
> not more.
>
> Downside of this patch is that the splash screen is possibly off, but
> we are going to completely disable the splash screen anyway since
> splash screens are evil and waste time. I would even strongly suggest
> that Xfce as a whole disables the splash screen by default: it takes
> longer to actually paint the throbbing mouse (hah!) than it actually
> does to start up most of the xfce4 components.
>
> Below patch does 2 things:
> - parallellize session component startup
> - disable startup notification for the terminal in case it was part
> of an xfce4-session. (this is a more optional component but shows
> that if you exited with a few terminals open you waste more time
> repainting the mouse cursor).
>
> please check if the patch parts below are correct and can be perhaps
> improved on. Comments welcome as usual :)
>
>
> Cheers,
>
> Auke
>
>
>
>
>
> ---
> diff -purN xfce4-session-4.4.2/xfce4-session/xfsm-manager.c
> xfce4-session-4.4.2.new/xfce4-session/xfsm-manager.c
> --- xfce4-session-4.4.2/xfce4-session/xfsm-manager.c
> 2007-11-17 11:31:07.000000000 -0800
> +++ xfce4-session-4.4.2.new/xfce4-session/xfsm-manager.c
> 2008-07-26 08:58:18.000000000 -0700
> @@ -454,7 +454,9 @@ xfsm_manager_startup_continue (const gch
> return;
> }
>
> - startup_done = xfsm_startup_continue (previous_id);
> + startup_done = FALSE;
> + while (!startup_done)
> + startup_done = xfsm_startup_continue (previous_id);
>
> if (startup_done)
> {
> diff -purN xfce4-session-4.4.2/xfce4-session/xfsm-startup.c
> xfce4-session-4.4.2.new/xfce4-session/xfsm-startup.c
> --- xfce4-session-4.4.2/xfce4-session/xfsm-startup.c
> 2007-11-17 11:31:07.000000000 -0800
> +++ xfce4-session-4.4.2.new/xfce4-session/xfsm-startup.c
> 2008-07-25 23:30:57.000000000 -0700
> @@ -374,7 +374,7 @@ xfsm_startup_autostart_xdg (void)
> terminal = xfce_rc_read_bool_entry (rc, "Terminal", FALSE);
>
> /* try to launch the command */
> - if (!xfce_exec (exec, terminal, startup_notify, &error))
> + if (!xfce_exec (exec, terminal, 0, &error))
> {
> g_warning ("Unable to launch \"%s\" (specified by %s):
> %s", exec, files[n], error->message);
> g_error_free (error);
>
> _______________________________________________
> Xfce4-dev mailing list
> Xfce4-dev at xfce.org
> http://foo-projects.org/mailman/listinfo/xfce4-dev
>
More information about the Xfce4-dev
mailing list