Messages in this thread |  | | | From | mlord <> | | Subject | Re: trashing caused by less | | Date | Sat, 30 Mar 1996 09:49:32 -0500 |
| |
hollubyi@ind.eunet.hu wrote: > > Hi ! > > I played around a bit with the pager less, and found that 50% > increase in file size gives a horrible increase (x400) in execution time.
Less does two things that affect this:
1) by default, on startup, it scans the entire file for newline chars, so that it can display line numbers at the bottom of the screen. There is a flag to turn this off.
2) whenever less reads from a pipe, it caches what it read into less's own internal buffer system, which grows as needed. If you happen to be on the verge of swapping, then this will dramatically slow down less since it's own internal buffers will cause more system swapping. It also does this buffering for files, but in that case it limits the number of buffers it uses, since it knows it can re-read the data if necessary.
There are a couple of flags you can use to tweak this. See the manpage.
|  |