Re: [dev] [hack] Having dmenu provide hints about current selected entry

From: Anselm R Garbe <anselm_AT_garbe.us>
Date: Fri, 26 Nov 2010 16:02:21 +0000

On Fri, Nov 26, 2010 at 04:42:36PM +0100, Christophe-Marie Duquesne wrote:
> On Fri, Nov 26, 2010 at 4:36 PM, Anselm R Garbe <garbeam_AT_gmail.com> wrote:
> > With vanilla dmenu
> >
> > seq 100000 | dmenu
> >
> > works instantaneously for me. I see some 2s lack if I increase to seq
> > 1000000 | dmenu though.
> > But is 1M items a usual scenario? I kind of doubt that and the 2s
> > penalty doesn't sound too bad imho.
>
> Again, this is not a matter of performance. Hints can be provided only
> once the user can interact. If you read, _then_ allow user
> interaction, you cannot add hints since you don't read anymore. You
> have to allow interaction _while_ still reading if you want to feed
> dmenu with hints from what is currently being typed.

Ok, but for this scenario select() would be a better candidate, as you can also
block input processing from the X server until your incremental input has been
read and you can avoid synchronising with some ugly mutex.

-Anselm
Received on Fri Nov 26 2010 - 17:02:21 CET

This archive was generated by hypermail 2.2.0 : Fri Nov 26 2010 - 17:12:02 CET