🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #15181

Re: NEWNEWS Command

#15181
From: bill davidsen
Date: Thu, 20 Feb 1997 00:00
28 lines
1861 bytes
In article <yy3u3n8ikex.fsf@velo.pp.vix.com>,
James Brister  <brister@vix.com> wrote:
| davidsen@tmr.com (bill davidsen) writes:
| 
| > I always wondered why this command is so _slow_? My history file is
| > about 2.5M lines, so the binary search used in INN would take ~22
| > disk accesses to find the starting point.
| 
| Actually it's worse than that -- it does the binary search by byte counts,
| not line counts. For an average line length of about 80 characters, you'd
| be looking at about 27 disk accesses.

Sure, but reading BUFSIZE bytes at a time and scanning forward for
the newline, the whole selected line should be in memory.

More to the point, 22, 27, whatever accesses should not take 50-100
sec to start sending data, no matter what the actual small number.
It was so slow I had to look at the code to be sure it wasn't
scanning with a linear search!
--
  bill davidsen <davidsen@tmr.com>
Some people hack for fun, some because they want things their way,
some don't because they can't, and some because they can't be
bothered. Some can make anything work, some can but would rather
not, and some could misconfigure a bowling ball.

Technical Details
Message-ID: <5ehpaa$497c@usenet1y.prodigy.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
References: <5doh1j$en4$1@jair.pressenter.com> <E5GFKo.Goz@spcuna.spc.edu> <5ecv0q$1bcm@usenet1y.prodigy.net> <yy3u3n8ikex.fsf@velo.pp.vix.com>

Show Full Headers
Complete Article Headers
Message-ID: <5ehpaa$497c@usenet1y.prodigy.net>
Subject: Re: NEWNEWS Command
Date: Thu, 20 Feb 1997 00:00:00 +0000
From: davidsen@tmr.com (bill davidsen)
References: <5doh1j$en4$1@jair.pressenter.com> <E5GFKo.Goz@spcuna.spc.edu> <5ecv0q$1bcm@usenet1y.prodigy.net> <yy3u3n8ikex.fsf@velo.pp.vix.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 220163156
Organization: TMR Associates, Schenectady NY
Newsgroups: news.software.nntp
Originator: davidsen@darkstar.prodigy.com