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 <garb...@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