Slow xfrun, [was: new dev branch stuff]

edscott wilson garcia edscott at
Fri Jan 21 16:06:41 CET 2005

El vie, 21-01-2005 a las 13:17 +0200, Mihai Bazon escribió:
> Well, first off, gmrun shows too what you're going to run--it shows
> all possible completions and you can easily select one with
> TAB/SHIFT-TAB or UP/DOWN.  Completion also works for executable names
> found in $PATH and for filesystem files (if you start with / or ~). 
> It also works to complete more words (i.e. you type "em<TAB>" and you
> get emacs, then <SPACE> and then you can type a file name using
> completion too).  It really is very powerful--give it a try, but
> beware it creates dependency.  8-)

Sounds very cool.

> Instead of libcombo (I don't know if there were such thing 3 years
> ago), it uses a plain GTK entry and a custom window with no
> decorations and a list inside for the completions list.

I was thinking of having xffm do this instead of calling xfrun when
called with a filename with no mimetype as argument. IMO, a better

> OTOH, gmrun is implemented in C++ which I presume is a big problem if
> you want to link it with xfrun.  I never touched the code in gmrun for
> 1.5 years or so :-( but for me it's as good as it gets and I don't
> feel like rewriting it in plain C (though I thought about it because
> it would improve startup performance).

A plain C wrapper can be written outside the C++, and then a library
file produced with no "main()". Probably just need to export one
function, one that returns the entry, so that xfrun can try to load your
library before  creating it's own combo. If it succeeds, it would create
the gmrun entry instead of the default combo with all your callbacks and
associated code "as is". I suppose creation of the "ok" and "cancel"
buttons would be skipped as well. Since it is a plugin, if anybody does
not like it, they just don't install your plugin (like oscilation not
installing libcombo plugin).

If you decide to take a shot at it, we could move the xfrun libcombo
functionality from xfrun to xffm. I'm a bit busy to do so at the moment,
with the xffm iconview, so please feel free to join the team.

> What could do well (perhaps it helps in xfrun too) is trying to
> statically link the binary.  But it seems it's a pain to do this with
> GTK programs (I never managed to).

Yes, I think that is the mayor issue in this startup problem. It is not
difficult at all. In fact, static linking is much easier than dynamic
linking. Dynamic linking should not be abused. 



More information about the Xfce4-dev mailing list