🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #65190

Re: Slow getting headers of all messages in group

#65190
From: Curt Welch
Date: Thu, 08 May 2003 00:43
30 lines
2205 bytes
gbeggs@Canada.com (Gerry) wrote:
> I'm making an NNTP client and I am able to have it fetch all the headers
> from a newsgroup to produce a list of the messages for the user to
> choose from.
>
> However, my program seems several times slower than others at fetching
> the headers of all the articles in a group.
>
> What is the best algorithm to do this?
>
> I've tried repeatedly sending 'next' and 'head' until I reach the last
> message.
> And I've tried indexing from the first message number to the last
> message number sending 'head <message number>'.

If you pipeline the commands you will do much better.  But the code is
harder to write.  By "pipeline", I mean send commands without waiting for
the reply before you send the next command.  But that's tricky stuff to get
right.

> Both methods work fine, but they are not nearly as fast as other
> newsreaders.

They use XOVER, not HEAD.  XOVER is a bulk dump of only the important
headers from all articles in the range.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Technical Details
Message-ID: <20030507204322.223$mL@newsreader.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!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.uchicago.edu!yellow.newsread.com!netaxs.com!newsread.com!feed3.newsreader.com!newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mail
References: <1fulso0.i1w65mh0muv4N%gbeggs@Canada.com>

Show Full Headers
Complete Article Headers
Message-ID: <20030507204322.223$mL@newsreader.com>
Subject: Re: Slow getting headers of all messages in group
Date: Thu, 08 May 2003 00:43:22 +0000
From: curt@kcwc.com (Curt Welch)
References: <1fulso0.i1w65mh0muv4N%gbeggs@Canada.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!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.uchicago.edu!yellow.newsread.com!netaxs.com!newsread.com!feed3.newsreader.com!newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mail
Organization: NewsReader.Com
Newsgroups: news.software.nntp
X-Trace: NewsReader.Com gZzFY,jOhPmi5F,96dHZq@6Q9Dupj3v_FZPXO5DCFTv-@shat
X-Face: "p}G*1KH{+F7EYGKLb>ogDguabZ+%,?^epeFB!nzu`)`$=QcvL1KF6<0GH!Tbc!Sqo[|tV5
  %IW48mQf3K=Ci&gZ7]]aazx@]Y-nq!r5{yH/#,?@lDdUDvOfByB2hVW0.@OM%{l/{cT'{w
X-Url: http://CurtWelch.Com/
User-Agent: NewsReader.Com
Lines: 29