🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #42042

Re: ARTICLE efficiency.

#42042
From: Curt Welch
Date: Wed, 08 Dec 1999 00:00
57 lines
3732 bytes
Russ Allbery <rra@stanford.edu> wrote:
> Luu Tran <luutran@nomail.invalid> writes:
>
> > I don't know the internal working of server software, so here's a
> > question for those who do:  In general, is it more efficient to do
> > ARTICLE by msg-id or article-no?  Obviously, to do the latter, you
> > first need to do a GROUP command, which may be slow.  But perhaps the
> > lookup time for article-no, once you're in a group, is shorter?

It's going to depend a lot on the server software and on how it's
configured.  In general, both will be about as fast I'd guess.

It also depends on if you are constantly switching groups for each
article.  If you read 10 articles from the same group, then doing one
group command and 10 article commands by article number will most likely
be slightly faster than 10 article commands by message-id.

But 10 sets of GROUP/ARTCICLE <#> will likely be slower than 10 ARTICLE
<ID> commands if the group is different for each article.

> For a server using traditional spool, ARTICLE by article number after
> you've done a GROUP command is slightly more efficient since it means not
> having to do a history lookup.  With other storage mechanisms, it may
> vary, although in general you're still shortcutting the history lookup or
> whatever the equivalent is in that server, and therefore requesting
> articles by group number will probably still be somewhat faster.
>
> > Simple experimentation on my part doesn't show much difference in
> > server response.
>
> History lookups (or the equivalent) are generally fairly fast.
>
> More critically, though, I believe some servers don't guarantee that
> article lookup by message ID will succeed, even if the article is present
> on the server.  So you may wish to prefer article numbers for the sake of
> correctness.  I could be misremembering this, though.

I know typhoon had the problem that lookup by message-id didn't work if
the message-id wasn't in the history file.  You had to configure the size
of the history file and if you set it too small for the size of your
spool, then history info would expire before the actual article did, and
at that point, ARTICLE <mid> would stop working even though the article
was still on the server and could be retrived using GROUP and article
numbers. Don't know if typhoon still works that way or not.  But if so,
it's possible lookup by Message-ID will fail for some of the older
articles, but not for all.

In general, when writing an NNTP client, I think one should always assume
that article retreival by number will always work (and will be about as
fast as possible for the server), and that article retrival by message-id
will probably work (so you can use it when you need to), but may not.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/

Technical Details
Message-ID: <19991208175339.887$h2@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!not-for-mail
References: <8E968A81Bluutrangeocities@207.126.101.100> <ylwvqp84hk.fsf@windlord.stanford.edu>

Show Full Headers
Complete Article Headers
Message-ID: <19991208175339.887$h2@newsreader.com>
Subject: Re: ARTICLE efficiency.
Date: Wed, 08 Dec 1999 00:00:00 +0000
From: curt@kcwc.com (Curt Welch)
References: <8E968A81Bluutrangeocities@207.126.101.100> <ylwvqp84hk.fsf@windlord.stanford.edu>
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: 558333327
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-User: Curt@NewsReader.Com
Organization: NewsReader.Com
X-Url: http://CurtWelch.Com/
Newsgroups: news.software.nntp