[PATCH] Make xfce4 start up faster
jp.guillemin
jp.guillemin at free.fr
Wed Aug 20 00:07:32 CEST 2008
Tested, it works as expected.
I can say that I like it, and the splash screen is still splashing,
which is nice even if it's quick ;)
JP
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