less: improve search when data is not supplied fast enough by stdin -
authorDenis Vlasenko <vda.linux@googlemail.com>
Mon, 17 Mar 2008 08:38:45 +0000 (08:38 -0000)
committerDenis Vlasenko <vda.linux@googlemail.com>
Mon, 17 Mar 2008 08:38:45 +0000 (08:38 -0000)
commit107fe7c081c2e0ab96628b431d9d812cdf9c82b2
tree653d231e2dc06c990044882dffb445c726dad791
parentaefed941c26aade36c5b51c8ef5ea6f740cc0e5d
less: improve search when data is not supplied fast enough by stdin -
now will try reading for 1-2 seconds before declaring that there is no match.
This fixes a very common annoyance with long manpages.

function                                             old     new   delta
read_lines                                           653     719     +66
buffer_down                                           28      83     +55
goto_match                                           140     141      +1
cap_cur_fline                                         72       -     -72
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 3/0 up/down: 122/-72)            Total: 50 bytes
   text    data     bss     dec     hex filename
 798734     661    7428  806823   c4fa7 busybox_old
 798768     661    7428  806857   c4fc9 busybox_unstripped
miscutils/less.c