Article View: news.software.readers
Article #48399Re: slrnpull slow when reading a newsgroup first time
From: Byrial Jensen
Date: Wed, 05 May 1999 00:00
Date: Wed, 05 May 1999 00:00
59 lines
3087 bytes
3087 bytes
Sylvan Butler <nospam+_no_Zs__9905@hpb13799z.zboi.hpz.com.invalid> wrote:
>Will this do? (I don't use slrnpull.c, so maybe I don't have the
>right numbers in that message... But the numbers you wanted aren't
>even readily available.)
>
>[patch]
Yes, something like that will do fine. I don't care about the
exact number of skipped articles, but I want a log message that
is more informative than misleading.
I had been looking at the code myself when I saw your patch. So
here is my suggestion at a change. It improves the condition for
when some articles are skipped by using also the first article
number in the group, and writes a message to the log when it
happens.
--- slrnpull.c~ Wed May 5 23:37:55 1999
+++ slrnpull.c Wed May 5 23:27:51 1999
@@ -786,7 +786,8 @@ static int *listgroup_numbers (NNTP_Type
static unsigned int Num_Duplicates;
static int *list_server_numbers (NNTP_Type *s, Active_Group_Type *g,
- int server_max, unsigned int *nump) /*{{{*/
+ int server_min, int server_max,
+ unsigned int *nump) /*{{{*/
{
char *name;
unsigned int min, max;
@@ -810,8 +811,12 @@ static int *list_server_numbers (NNTP_Ty
* all the message-ids when the user specifies a limit to grab.
*/
if ((max <= 1) && (g->max_to_get != 0)
- && ((unsigned int) server_max > g->max_to_get))
- max = (unsigned int) server_max - g->max_to_get + 1;
+ && (g->max_to_get < server_max - server_min + 1))
+ {
+ max = (unsigned int) server_max - g->max_to_get + 1;
+ log_message ("%s: Skipping articles %d-%d.", g->name,
+ server_min, max - 1);
+ }
status = nntp_server_vcmd (s, "XHDR Message-Id %u-", max);
if (status == -1)
@@ -1305,7 +1310,7 @@ static int get_group_articles (NNTP_Type
}
Num_Duplicates = 0;
- numbers = list_server_numbers (s, g, server_max, &num_numbers);
+ numbers = list_server_numbers (s, g, server_min, server_max, &num_numbers);
if (Num_Duplicates)
log_message ("%u duplicates removed leaving %u/%u.",
Num_Duplicates, num_numbers, num_numbers + Num_Duplicates);
--
Regards,
Byrial
Technical Details
Message-ID:
<slrn7j1f8m.mu.bjensen@ask.ask>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mailReferences:
<slrn7iqpnc.eb.bjensen@ask.ask> <slrn7irln7.f4q.davis@aluche.mit.edu> <slrn7is4fi.g7.bjensen@ask.ask> <slrn7is930.m9v.davis@aluche.mit.edu> <slrn7j0d0a.c3.bjensen@ask.ask> <slrn7j13vh.5tm.nospam+_no_Zs__9905@hpb13799z.zboi.hpz.com.invalid>Show Full Headers
Complete Article Headers
Message-ID: <slrn7j1f8m.mu.bjensen@ask.ask> Subject: Re: slrnpull slow when reading a newsgroup first time Date: Wed, 05 May 1999 00:00:00 +0000 From: bjensen@nospam.dk (Byrial Jensen) References: <slrn7iqpnc.eb.bjensen@ask.ask> <slrn7irln7.f4q.davis@aluche.mit.edu> <slrn7is4fi.g7.bjensen@ask.ask> <slrn7is930.m9v.davis@aluche.mit.edu> <slrn7j0d0a.c3.bjensen@ask.ask> <slrn7j13vh.5tm.nospam+_no_Zs__9905@hpb13799z.zboi.hpz.com.invalid> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail X-Deja-AN: 474492841 X-Complaints-To: news-abuse@image.dk X-Trace: news020.image.dk 925941689 212.54.69.173 (Thu, 06 May 1999 00:01:29 MET DST) NNTP-Posting-Date: Thu, 06 May 1999 00:01:29 MET DST Newsgroups: news.software.readers