Commit Graph

8 Commits

Author SHA1 Message Date
hoek
570ebf6d32 Rather than use an LRU-ordered circular list to store buffered data,
simply keep an index into the last access on the circular list and begin
searches at that point.  An LRU list is inappropriate here since the
vast majority of accesses will occur in the same order that the list
is created in.  The only case where an LRU is remotely useful here is when
reading from a file and the user is jumping to randomish positions and
constantly returning to some central position.  Even for this case it is
such a small optimization as not to be noticed in an interactive program
such as more(1).

This change results in a _tremendously_ noticable speed-up when reading long
files through a pipe (where long = ~200k, machine = ~2.5h single-disk
worldstone).
1999-12-28 05:47:24 +00:00
hoek
e928a8a855 Delete dead code and clean comments a little. 1999-12-28 03:01:20 +00:00
hoek
f1cf11464c Remove documentation of CRLF bug from more.1. Sync code with manpage.
PR:		bin/961 bin/7296 (fix)
Submitted by:	Garance Alistair Drosehn <gad@eclipse.acs.rpi.edu>
1999-04-29 18:03:38 +00:00
steve
aa2a06ad6f sprintf -> snprintf to avoid potential buffer overflow.
PR:		6907
Submitted by:	Archie Cobbs <archie@whistle.com>
1998-06-14 16:03:40 +00:00
rgrimes
79e59e9123 Remove trailing whitespace. 1995-05-30 06:41:30 +00:00
ache
5d3bd309c1 Back out part of ctype fixes, unneded with new ctypoe 1994-10-09 15:40:07 +00:00
ache
f68308c2d8 1) Make ctype-aware expect chars in range 0200-0204 treated
as controls in any case.
2) Fix bug with incorrect column position when standouts occurse
3) Fix bug when last standouted char cause clearing next line
in standout
1994-09-22 01:19:13 +00:00
rgrimes
f9ab90d9d6 BSD 4.4 Lite Usr.bin Sources 1994-05-27 12:33:43 +00:00