Improving trn: LISTGROUP with no arguments vs. ...?

Liste des GroupesRevenir à ns nntp 
Sujet : Improving trn: LISTGROUP with no arguments vs. ...?
De : legalize+jeeves (at) *nospam* mail.xmission.com (Richard)
Groupes : news.software.nntp
Date : 05. Nov 2024, 00:16:17
Autres entêtes
Organisation : multi-cellular, biological
Message-ID : <vgbkk1$30c1$1@news.xmission.com>
User-Agent : trn 4.0-test77 (Sep 1, 2010)
[Please do not mail me a copy of your followup]

Hi All,

Currently trn4 does a LISTGROUP command with no arguments when
entering a newsgroup.  When entering a newsgroup with many messages
(e.g. a large difference between low and high article numbers), this
can be very slow.  (See <https://github.com/LegalizeAdulthood/trn/issues/9>)

LISTGROUP can take low and high article number arguments, and my initial
thought was that trn should issue LISTGROUP with arguments based on
the user's newsrc file to build a list of article numbers representing
unread articles.

Then I wondered about cross-reference headers, which mention articles
by number, and I wondered if the reason trn was fetching all article
numbers was in order to prefetch headers for every article in case it
was mentioned in a cross-reference.

Using strace, I see that trn will start fetching overview data for
(seemingly all the listed) articles while paused for user input.

trn is quite old code and doesn't even use the older NNTP extension,
nevermind the newer extensions one could expect from a more modern
server like inn.

For reference the existing code that takes a long time is here:
<https://github.com/LegalizeAdulthood/trn/blob/a70daddff78d08e0d2c97739009376ad29094905/libtrn/bits.cpp#L252>
It's not the algorithm that is slow per se, but asking inn for all the
article numbers in a group with thousands of articles takes quite a
long time.  I suspect that inn doesn't have any sort of in-memory
cache for this information and instead is directory scanning the spool
directory and reporting back the article numbers one by one.

What's the best alternative to LISTGROUP with no args?

Thanks
--
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
            The Terminals Wiki <http://terminals-wiki.org>
     The Computer Graphics Museum <http://computergraphicsmuseum.org>
  Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>

Date Sujet#  Auteur
5 Nov 24 * Improving trn: LISTGROUP with no arguments vs. ...?6Richard
5 Nov 24 +- Re: Improving trn: LISTGROUP with no arguments vs. ...?1Urs Janßen
5 Nov 24 `* Re: Improving trn: LISTGROUP with no arguments vs. ...?4Julien ÉLIE
6 Nov 24  `* Re: Improving trn: LISTGROUP with no arguments vs. ...?3Richard
6 Nov 24   `* Re: Improving trn: LISTGROUP with no arguments vs. ...?2Julien ÉLIE
18 Nov 24    `- Re: Improving trn: LISTGROUP with no arguments vs. ...?1Richard

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal