How to get to Xfce 4.4

Jani Monoses jani.monoses at gmail.com
Mon Jan 9 11:50:45 CET 2006


> 
>>>* Some people have complained about the speed of xfrun and suggested the 
>>>use of gmrun (I think). We should check if we can't simply use gmrun 
>>>code. Needs someone to do the work; should be fairly easy.
> 
> 
> Put it off.  No one has time for this, and no matter how "fairly easy"
> we think it is, it really never is.

Indeed gmrun feels snappier than xfrun4. I straced both and looks like
xfrun4 does a lot more file syscalls at startup, due to it using two
icons (It has a Run and a Cancel button, while gmrun is  just the
textbox) so it touches many files in usr/shar/icons and pixmaps.

I just semi-blindly ifdefed the button code (see patch) and now xfrun4
seems faster to start -  although you'd need a slow disk to better see
the difference. With this xfrun4 is in the same area as gmrun, about
three times less file syscalls.
Here's the # of the common file syscalls per gmrun (,g), xfrun4 (,x1)
and modified xfrun4 (,x2)

stat:
,g:160
,x1:724
,x2:177

open:
,g:127
,x1:384
,x2:129

read:
,g:305
,x1:672
,x2:269

write:
,g:60
,x1:401
,x2:57


Also from a usabilty pov I think the buttonless case is better.
 alt-f2 is used by keyboard people mostly so instead of Run/Cancel
buttons they'll most probably just use return/esc, so the buttons are
just decoration IMHO.

xfrun4 could be even faster if it was in-process, maybe in xfce-session?
It should be as instant as window operations using keys.

thanks
Jani

Index: xfrun/xfrun.c
===================================================================
--- xfrun/xfrun.c       (revision 19354)
+++ xfrun/xfrun.c       (working copy)
@@ -444,6 +444,7 @@
     else title=g_strdup(_("Run program"));
     dialog = gtk_dialog_new_with_buttons(title, NULL,
GTK_DIALOG_NO_SEPARATOR, NULL);
     g_free(title);
+#if 0
     button = gtk_button_new_from_stock(GTK_STOCK_CANCEL);
     GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
     gtk_dialog_add_action_widget(GTK_DIALOG(dialog), button,
GTK_RESPONSE_CANCEL);
@@ -456,6 +457,7 @@
     GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
     gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_OK);

+#endif
     gtk_window_set_default_size(GTK_WINDOW(dialog), 400, 10);
     gtk_window_set_position(GTK_WINDOW(dialog), GTK_WIN_POS_CENTER);






More information about the Xfce4-dev mailing list