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

From: Ramil Farkhshatov <ramil_AT_gmx.co.uk>
Date: Wed, 01 Dec 2010 14:12:54 +0300

Christophe-Marie Duquesne <chm.duquesne_AT_gmail.com> wrote:

> On Wed, Dec 1, 2010 at 2:34 AM, Ramil Farkhshatov <ramil_AT_gmx.co.uk> wrote:
> > it doesn't run match() on each item, that increases speed and
> > reduces cpu usage. But conditions to run match() must be reconsidered:
> > in this patch it is called once a second.
>
> Would it make sense to call match() only when there is nothing left to
> read on stdin (in your example, that would be when readstdin() returns
> 0)?

If dmenu starts matching after exhausting of data then it will not
differ in behaviour from synchronous vanilla version. The condition may
be something like:

(time_since_last_match_ms > threshold_ms
|| items_since_last_match > threshold_nitems
|| data_exhausted)
Received on Wed Dec 01 2010 - 12:12:54 CET

This archive was generated by hypermail 2.2.0 : Wed Dec 01 2010 - 12:24:02 CET