🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
12 messages
12 total messages Started by Karl Denninger Wed, 19 Jan 1994 04:15
TIN is a huge pig -- still -- IS THERE A FIX FOR THIS COMING?
#7410
Author: Karl Denninger
Date: Wed, 19 Jan 1994 04:15
45 lines
2626 bytes
I am at my wits end.

If there is no fix for this sometime soon TIN gets tossed, perhaps
permanently, off MCSNet. 

I have complained about the idea that newsreaders should assume it is ok to
allocate 10MB of RAM for a single user before.  TIN makes this assumption.  

This is an <outrage>.  Folks, when you write code you cannot assume that
people have 256MB of RAM in their desktop or server machines.  You cannot
assume that there is only one person on a system.  You cannot assume that a
CPU and RAM is dedicated to a single person reading <news>, for Gods sake.

It is now to the point where systems are getting slagged here, and the 
alternatives are:

1)	Go to 256MB of RAM in the servers.  Not bloody likely for one
	application, especially when there are other choices (trn, rn, etc).

2)	Delete TIN and forget about it.

3)	Someone might actually pay attention to the problem that was
	posted over a month ago, find the problem, and issue a patch
	for it.  

The older versions <didn't have this problem> -- but they screwed up the 
index files on occasion, and didn't know how to read .overview files at 
all.  1.2PL2 has the problem, and I've seen no indication that there is 
a fix forthcoming anytime soon.

What did the development person(s) change to cause this?  WHY folks?  What
kind of bogosity in coding demands this kind of RAM usage?

Sorry for the belligerent tone, but this is truly rediculous.  TIN is more
of a pig than EPOCH (Emacs under X11) has ever been, and that's a package
that I consider to be obscene as well.  At least you can live in EPOCH
and do useful work; TIN is a single-purpose package and has no business
placing that kind of demand on a character mode session.

'Nuff said.

--
Karl Denninger (karl@MCS.COM) 	| MCSNet - First Interactive Internet and 
Modem: [+1 312 248-0900]	| Clarinet feed in Chicago.  Send email to
Voice/FAX: [+1 312 248-8649]	| "info@mcs.com" for more information.
Re: TIN is a huge pig -- still -- IS THERE A FIX FOR THIS COMING?
#7423
Author: Sergio L Aponte
Date: Wed, 19 Jan 1994 07:27
9 lines
1181 bytes
	I don't understand. Can you tell us which machine/OS?

	I am on a SUN IPC, 4.1.2 OS, and Tin right now is at 1152K.

--
==========================================================================
Sergio L. Aponte, The ASK Group, Inc.
Internet : sergio@ingres.com
UUCP     : {sun,mtxinu,pyramid,pacbell}!ingres!sergio
Re: TIN is a huge pig -- still -- IS THERE A FIX FOR THIS COMING?
#7420
Author: Dave Pascoe
Date: Wed, 19 Jan 1994 15:28
13 lines
1353 bytes
Sergio L Aponte (sergio@Ingres.COM) wrote:

: 	I am on a SUN IPC, 4.1.2 OS, and Tin right now is at 1152K.

Tin is around 400k here.........the original poster's claim seems way
out of line.  I have never seen Tin claim nearly that much memory....

Please give us some more details on your complete configuration.

==== Dave Pascoe ===================== pascoe@mathworks.com ==========
     The MathWorks, Inc.
     24 Prime Park Way, Natick, MA 01760
==== Tel: 508-653-2452 (x362) ==== Fax: 508-653-2997 =================
Re: TIN is a huge pig -- still -- IS THERE A FIX FOR THIS COMING?
#7435
Author: Karl Denninger
Date: Thu, 20 Jan 1994 07:34
21 lines
1489 bytes
In article <1994Jan19.072707.540@pony.ingres.com>,
Sergio L Aponte <sergio@Ingres.COM> wrote:
>
>	I don't understand. Can you tell us which machine/OS?
>
>	I am on a SUN IPC, 4.1.2 OS, and Tin right now is at 1152K.

Wait till a few groups get added.  You'll find that the first time that you
go in after they appear you'll end up with a HUGE RSS.  

Unfortunately, groups get added all the time.

Note also that this is a bug specific to 1.2 (PL2 even perhaps), and that
PL2 is the only one which properly understands .overview files.

I'm running BSDI.

--
Karl Denninger (karl@MCS.COM) 	| MCSNet - First Interactive Internet and 
Modem: [+1 312 248-0900]	| Clarinet feed in Chicago.  Send email to
Voice/FAX: [+1 312 248-8649]	| "info@mcs.com" for more information.
Re: TIN is a huge pig -- still -- IS THERE A FIX FOR THIS COMING?
#7436
Author: Karl Denninger
Date: Thu, 20 Jan 1994 07:36
21 lines
1615 bytes
In article <2hjji0$pln@turing.mathworks.com>,
Dave Pascoe <pascoe@MathWorks.Com> wrote:
>Sergio L Aponte (sergio@Ingres.COM) wrote:
>
>: 	I am on a SUN IPC, 4.1.2 OS, and Tin right now is at 1152K.
>
>Tin is around 400k here.........the original poster's claim seems way
>out of line.  I have never seen Tin claim nearly that much memory....
>
>Please give us some more details on your complete configuration.

Roughly 4000 groups online, BSDI 1.0, compiled with GCC Tin 1.2PL2.

Netcom admins complained about the same problem in this group about two
months ago on SunOS.  Its not OS specific.  I have not yet seen a PL3 
(ie: a patch for this).

--
Karl Denninger (karl@MCS.COM) 	| MCSNet - First Interactive Internet and 
Modem: [+1 312 248-0900]	| Clarinet feed in Chicago.  Send email to
Voice/FAX: [+1 312 248-8649]	| "info@mcs.com" for more information.
Re: TIN is a huge pig -- still -- IS THERE A FIX FOR THIS COMING?
#7437
Author: Pope Clifton
Date: Thu, 20 Jan 1994 07:47
124 lines
4882 bytes
Karl Denninger (karl@MCS.COM) wrote:
: I am at my wits end.

: If there is no fix for this sometime soon TIN gets tossed, perhaps
: permanently, off MCSNet. 

I don't know quite why you are having more problems than other sites. 
Netcom also had a lot of problems.

One of the Netcom support guys got a friend to come up with a patch and
submitted it.  I think it is in testing for 1.2PL3, but that seems to be
taking a while.

I have dropped out of the maintenance cycle due to arthritis, but here is a
copy of the patch.  I take no responsibility....  Also, you might have to
make adjustments in applying it to 1.2PL1 which works better in many
respects.

  -- Clifton

========================================
From hawkeye@glia.biostr.washington.edu  Sun Dec  5 21:13:06 1993
Return-Path: <hawkeye@glia.biostr.washington.edu>
Received: from mailhost1.cac.washington.edu by mail.netcom.com (8.6.4/SMI-4.1/Netcom) 	id VAA13571; Sun, 5 Dec 1993 21:13:04 -0800
Received: from glia.biostr.washington.edu by mailhost1.cac.washington.edu 	(5.65/UW-NDC Revision: 2.28 ) id AA00401; Sun, 5 Dec 93 21:12:39 -0800
From: hawkeye@glia.biostr.washington.edu (Ken Keys)
Posted-Date: Sun, 5 Dec 93 21:20:54 PST
Message-Id: <9312060520.AA07331@glia.biostr.washington.edu>
Received: by glia.biostr.washington.edu   (911016.SGI/Eno-0.1) id AA07331; Sun, 5 Dec 93 21:20:59 -0800
Subject: Patch to tin 1.22
To: iain.lea@erlm.siemens.de
Date: Sun, 5 Dec 93 21:20:54 PST
Cc: sterling@oldcolo.com, cliftonr@netcom.com
X-Mailer: ELM [version 2.3 PL11]
Status: RO

At the request of Bruce Sterling Woodcock (sterling@oldcolo.com), I
wrote a patch that signifigantly reduces the memory usage of the
program.  In the t_notice structure, instead of delaring name with
length MAXPATHLEN, I allocate it dynamically.  I figure this is an
average of 20 bytes (plus malloc overhead) per group, instead of 1024.
For ~4000 groups, that's a BIG savings.
 
-- 
Ken "Hawkeye" Keys                  |  If you use TinyFugue, help support it.
hawkeye@glia.biostr.washington.edu  |  Send donations to:  Ken Keys
------------------------------------+-------------+        1820 Cottonwood Av.
Official TF ftp site: glia.biostr.washington.edu  |        Carlsbad CA 92009


diff -c tin-1.22/active.c tin-ksk/active.c
*** tin-1.22/active.c	Sat Sep 25 07:30:08 1993
--- tin-ksk/active.c	Sun Dec  5 20:44:44 1993
***************
*** 524,535 ****
  		if (buf[0] == '.') {
  			break;
  		}
! 		strncpy (old_active[num].name, buf, sizeof (old_active[num].name));
! 		ptr = old_active[num].name;
  		while (*ptr && *ptr != ' ' && *ptr != '\n') {
  			ptr++;
  		}
! 		*ptr = '\0';
  		old_active[num].visited = FALSE;
  		num++;
  		if (num >= max_old_active) {
--- 524,545 ----
  		if (buf[0] == '.') {
  			break;
  		}
! 
! 		ptr = buf;
  		while (*ptr && *ptr != ' ' && *ptr != '\n') {
  			ptr++;
  		}
! 
! 		/*
! 		 * The average length of a name including '\0' is around 20 bytes.
! 		 * So instead of using an array of length MAXPATHLEN (==1024),
! 		 * we allocate only what we need here.  For 4000 group names,
! 		 * this reduces the process size by over 3.8 M.  --Ken Keys
! 		 */
! 		old_active[num].name = (char *) my_malloc(ptr - buf + 1);
! 		strncpy(old_active[num].name, buf, ptr - buf);
! 		old_active[num].name[ptr - buf] = '\0';
! 
  		old_active[num].visited = FALSE;
  		num++;
  		if (num >= max_old_active) {
***************
*** 731,736 ****
--- 741,748 ----
  	 * Free malloc'd arrays
  	 */
  	if (old_active != (notify_p) 0) {
+ 		for (i = 0; i < num; i++)
+ 			free (old_active[i].name);
  		free ((char *) old_active);
  		old_active = (notify_p) 0;
  	}
diff -c tin-1.22/tin.h tin-ksk/tin.h
*** tin-1.22/tin.h	Sat Sep 25 07:30:04 1993
--- tin-ksk/tin.h	Sun Dec  5 17:19:04 1993
***************
*** 1040,1046 ****
  
  struct t_notify
  {
! 	char name[PATH_LEN];
  	int visited;
  };
  
--- 1040,1046 ----
  
  struct t_notify
  {
! 	char *name;
  	int visited;
  };


--
cliftonr@netcom.com  Clifton Royston, Pope of the CotSG in Paradise 
Re: TIN is a huge pig -- still -- IS THERE A FIX FOR THIS COMING?
#7441
Author: Steve Alvey
Date: Thu, 20 Jan 1994 10:33
494 lines
15593 bytes
Karl Denninger (karl@MCS.COM) wrote:
> In article <1994Jan19.072707.540@pony.ingres.com>,
> Sergio L Aponte <sergio@Ingres.COM> wrote:
> >

> Note also that this is a bug specific to 1.2 (PL2 even perhaps), and that
> PL2 is the only one which properly understands .overview files.


Yes we were exhibiting this behaviour when new newsgroups were appearing, I looked
deeper into the problem, and realised that the way the software sensed new
newsgroups and bogus newsgroups was rather memory inefficient.
 The descriptive comment from the code is shown  below.

SPA: my code only creates one sorted array (sorted_active), it then
uses bsearch (binary search) for each line read from the 'old'
active file, if it is found then the newsgroup is in both the old
and new active files. Mark it as visited in the active list. If it is
not found then it is a bogus group. After all 'old' groups have
been read we loop round the active lst to see is there are any that
have not been 'visited', these are the new groups.

The code used to work by creating two sorted lists of the 'old' and
'new' active. It then stepped through the 'old' list to match with
the new. The theory behind this operation is that the number of
comparisons is proportional to the number of groups. The
disadvantage with my approach is that the number of comparisons is
larger, a binary search does on average log2(n) searches (e.g. 8
comparisons for 4000 entries. However my approach also does one
less qsort, which is a big win. (not sure how many comparisons qsort does)


Note the following unofficial patch is only for VERSION 1.2, PATCHLEVEL 2. It uses
bsearch(), which is available on most systems, or from your favorite FTP site.
[n.b: i've only built it using gcc]

I recommend you change your patchlev.h file to signify unofficial patch level
status. e.g. 

#define PATCHLEVEL      "2 (SPA)"

Please Mail me (spa@galadriel.bt.co.uk) if you use this patch / have problems



---------------8<---------8<----------8<--------------------------------------
*** tin.h.orig	Fri Oct  1 15:11:47 1993
--- tin.h	Fri Dec  3 10:44:04 1993
***************
*** 908,918 ****
  	char *description;		/* text from LIBDIR/newsgroups file */
  	char *spooldir;			/* groups spool directory */
  	char moderated;			/* state of group moderation */
  	long max;			/* max. article number */
  	long min;			/* min. article number */
- 	int type;			/* grouptype - newsgroup / mailbox */
  	int next;			/* next active entry in hash chain */
- 	int my_group;			/* subscribed/unsubscribed to group */
  	int unread;			/* unread articles in group */
  	long newsrcmax;			/* newsrc max (lastmax) */
  	long newsrcmin;			/* newsrc min (lastmin) */
--- 908,919 ----
  	char *description;		/* text from LIBDIR/newsgroups file */
  	char *spooldir;			/* groups spool directory */
  	char moderated;			/* state of group moderation */
+ 	unsigned type:2;		/* grouptype - newsgroup / mailbox */
+ 	unsigned visit:1;		/* 1 means exists in both active files*/
+ 	unsigned  my_group:2;		/* subscribed/unsubscribed to group */
  	long max;			/* max. article number */
  	long min;			/* min. article number */
  	int next;			/* next active entry in hash chain */
  	int unread;			/* unread articles in group */
  	long newsrcmax;			/* newsrc max (lastmax) */
  	long newsrcmin;			/* newsrc min (lastmin) */
***************
*** 1032,1051 ****
      long	tzone;
  } TIMEINFO;
  
- /*
-  * Used for detecting new groups when reading news locally.  It's easy to be 
-  * confused by arrays of pointers to pointers, so typedef's are used for the 
-  * first level pointers to keep it clearer.
-  */
  
- struct t_notify
- {
- 	char name[PATH_LEN];
- 	int visited;
- };
- 
  typedef struct t_group *group_p;
- typedef struct t_notify *notify_p;
  
  /*
   * Determine signal return type
--- 1033,1040 ----
*** active.c.orig	Tue Sep 28 12:43:04 1993
--- active.c	Fri Dec  3 10:01:28 1993
***************
*** 19,24 ****
--- 19,25 ----
  int group_hash[TABLE_SIZE];			/* group name --> active[] */
  int reread_active_file = FALSE;
  int active_index = -1;
+ char *index(char*,char);
  
  /*
   *  Compare two pointers to "group_t" structures - used in qsort.
***************
*** 32,50 ****
  	return (strcmp ((*group1)->name, (*group2)->name));
  }
  
- /*
-  *  Compare two pointers to "notify_t" structures - used in qsort.
-  */
  
- int
- cmp_notify_p (notify1, notify2)
- 	notify_p *notify1;
- 	notify_p *notify2;
- {
- 	return (strcmp ((*notify1)->name, (*notify2)->name));
- }
- 
- 
  /*
   *  Get default array size for active[] from environment (AmigaDOS)
   *  or just return the standard default.
--- 33,39 ----
***************
*** 431,437 ****
--- 420,429 ----
  	char old_active_file_attribute[LEN];
  	char buf[LEN], *ptr;
  	FILE *fp = (FILE *) 0;
+ 	group_p *found = (group_p *) 0;
  	group_p *sorted_active = (group_p *) 0;
+ 	struct t_group tgroup;
+ 	group_p p_group = &tgroup;
  	int group_not_found;
  	int ch, num = 0;	/* num == num_old_active groups */
  	int ch_default = 'n';
***************
*** 441,448 ****
  	int old_active_size;
  	long epoch;
  	int compared;
- 	notify_p old_active = (notify_p) 0;
- 	notify_p *sorted_old_active = (notify_p *) 0;
  	char *autosubscribe, *autounsubscribe;
  	register int i, j;
  	struct stat sb;
--- 433,438 ----
***************
*** 514,549 ****
  
  	Raw (TRUE);
  
- 	old_active = (notify_p) my_malloc ((unsigned) sizeof (struct t_notify) * max_old_active);
- 	if (old_active == (notify_p) 0) {
- 		error_message (txt_out_of_memory, progname);
- 		goto notify_groups_done;
- 	}
  
- 	while (fgets (buf, sizeof (buf), fp) != NULL) {
- 		if (buf[0] == '.') {
- 			break;
- 		}
- 		strncpy (old_active[num].name, buf, sizeof (old_active[num].name));
- 		ptr = old_active[num].name;
- 		while (*ptr && *ptr != ' ' && *ptr != '\n') {
- 			ptr++;
- 		}
- 		*ptr = '\0';
- 		old_active[num].visited = FALSE;
- 		num++;
- 		if (num >= max_old_active) {
- 			max_old_active= max_old_active + (max_old_active / 2);
- 			old_active= (notify_p) my_realloc(
- 				(char *) old_active,
- 				(unsigned) sizeof(struct t_notify) * max_old_active);
- 			if (old_active == (notify_p) 0) {
- 				error_message (txt_out_of_memory, progname);
- 				goto notify_groups_done;
- 			}
- 		}
- 	}
- 
  	/* 
  	 * Check if there are user-set groups to be 
  	 * automatically subscribed or unsubscribed.
--- 504,510 ----
***************
*** 550,588 ****
  	 */
  	autosubscribe = getenv ("AUTOSUBSCRIBE");
  	autounsubscribe = getenv ("AUTOUNSUBSCRIBE");
! 
! 	if (read_news_via_nntp) {
! 		for (i = 0 ; i < num ; i++) {
! 			if (find_group_index (old_active[i].name) == -1) {
! 				continue;
! 			}
! 			if (! prompt_subscribe_group (old_active[i].name,
! 				autosubscribe, autounsubscribe)) {
! 				if (cmd_line) {
! 					printf ("\r\n");
! 					fflush (stdout);
! 				}
! 				goto notify_groups_done;
! 			}
! 		}
! 	} else {	
! 		wait_message (txt_checking_active_file);
! 		/*
! 		 * The following code replaces the original check for new newsgroups,
! 		 * a source of much aggravation.
! 		 *
! 		 * The original algorithm compared each group name in active to (on
! 		 * average) 1/2 the groups in old_active, for ~N*N/2 string compares.
! 		 * This works out to ~~ 8,000,000 comparisons for 4000 newsgroups.
! 		 *
! 		 * The new algorithm allocates an array of pointers to the active
! 		 * and old_active array elements, sorts each pointer array with
! 		 * quicksort, then scans through the two arrays in 1 pass; this takes
! 		 * 2*N*Log2(N) string compares for the sorts, N for the final pass.
! 		 * This should work out to ~~ 100,000 comparisons for the same 4000
! 		 * newsgroups, a BIG, BIG win.
! 		 */
! 
  		/* 
  		 * Allocate arrays to be sorted 
  		 */
--- 511,518 ----
  	 */
  	autosubscribe = getenv ("AUTOSUBSCRIBE");
  	autounsubscribe = getenv ("AUTOUNSUBSCRIBE");
! 	wait_message (txt_checking_active_file);
! 	if(!read_news_via_nntp) {
  		/* 
  		 * Allocate arrays to be sorted 
  		 */
***************
*** 592,681 ****
  			error_message (txt_out_of_memory, progname);
  			goto notify_groups_done;
  		}
- 		sorted_old_active = (notify_p *) my_malloc (
- 			(unsigned) sizeof (notify_p) * num);
- 		if (sorted_old_active == (notify_p *) 0) {
- 			error_message (txt_out_of_memory, progname);
- 			goto notify_groups_done;
- 		}
- 
  		/* 
  		 * Fill arrays to be sorted 
  		 */
  		for (i = 0 ; i < num_active ; i++) {
  			sorted_active[i] = &active[i];
  		}
- 		for (j = 0 ; j < num ; j++) {
- 			sorted_old_active[j] = &old_active[j];
- 		}
  
  		/* 
! 		 * Sort the arrays 
  		 */
  		qsort (sorted_active, num_active, sizeof (group_p), cmp_group_p);
- 		qsort (sorted_old_active, num, sizeof (notify_p), cmp_notify_p);
- 
- 		/* 
- 		 * Now do the pass through both arrays at once 
- 		 */
- 		for (i = 0, j = 0 ; i < num_active ; i++) {
- 			group_not_found = TRUE;
- 			compared = 1;
- 			while ((j < num) && 
- 				(0 > (compared = strcmp (
- 				sorted_old_active[j]->name, 
- 				sorted_active[i]->name)))) {
- 				j++;
- 			}
- 			if (compared == 0) {
- 				/* 
- 				 * found it so read in next group 
- 				 */
- 				group_not_found = FALSE;
- 				sorted_old_active[j]->visited = TRUE;
- 				j++;
- 			}
- 
- 			if (group_not_found == FALSE) {
- 				continue;
- 			}
- 
- 			update_old_active = TRUE;
- 
- 			/* 
- 			 * auto-subscribe/unsubscribe logic 
- 			 */
- 			if (! prompt_subscribe_group (sorted_active[i]->name,
- 				autosubscribe, autounsubscribe)) {
- 				if (cmd_line) {
- 					printf ("\r\n");
- 					fflush (stdout);
- 				}
- 				goto notify_groups_done;
- 			}
- 		}
  	}
  
! 	if (cmd_line) {
! 		fputc ('\r', stdout);
! 		fflush (stdout);
! 	}
! 	CleartoEOLN();
  
! 	if (! read_news_via_nntp) {
  		/*
  		 * Look for bogus groups 
  		 */
  		ch_default = 'y';
- 		for (j = 0 ; j < num ; j++)  {
- 			if (old_active[j].visited) {
- 				continue;
- 			}
  			do {	
  				update_old_active= 1;
  				fputc ('\r', stdout);
  				CleartoEOLN ();
! 				printf (txt_delete_bogus_group, old_active[j].name, ch_default);
  				fflush (stdout);
  				ch = ReadCh ();
  				if (ch == CR) {
--- 522,601 ----
  			error_message (txt_out_of_memory, progname);
  			goto notify_groups_done;
  		}
  		/* 
  		 * Fill arrays to be sorted 
  		 */
  		for (i = 0 ; i < num_active ; i++) {
  			sorted_active[i] = &active[i];
+ 			active[i].visit=0;	/*reset bitfield*/
  		}
  
  		/* 
! 		 * Sort the array
  		 */
  		qsort (sorted_active, num_active, sizeof (group_p), cmp_group_p);
  	}
+ /* SPA: my code only creates one sorted array (sorted_active), it then
+  * uses bsearch (binary search) for each line read from the 'old'
+  * active file, if it is found then the newsgroup is in both the old
+  * and new active files. Mark it as visited in the active list. If it is
+  * not found then it is a bogus group. After all 'old' groups have
+  * been read we loop round the active lst to see is there are any that
+  * have not been 'visited', these are the new groups.
+  *
+  * The code used to work by creating two sorted lists of the 'old' and
+  * 'new' active. It then stepped through the 'old' list to match with
+  * the new. The theory behind this operation is that the number of
+  * comparisons is proportional to the number of groups. The
+  * disadvantage with my approach is that the number of comparisons is
+  * larger, a binary search does on average log2(n) searches (e.g. 8
+  * comparisons for 4000 entries. However my approach also does one
+  * less qsort, which is a big win. (not sure how many comparisons qsort does)
+  */
+ 	while (fgets (buf, sizeof (buf), fp) != NULL) {
+ 		    /*NNTP terminates with '.' on a line by itself*/
+ 		if (buf[0] == '.' && buf[1] < 'A') {
+ 			break;
+ 		}
+ 		ptr = buf;
+ 		while (*ptr && *ptr != ' ' && *ptr != '\n') {
+ 			ptr++;
+ 		}
+ 		*ptr = '\0';
+ 		num++;
  
! 		if (read_news_via_nntp) {
! 		    if (find_group_index (buf) == -1) {
! 			    continue;
! 		    }
! 		    if (! prompt_subscribe_group (buf,
! 			    autosubscribe, autounsubscribe)) {
! 			    if (cmd_line) {
! 				    printf ("\r\n");
! 				    fflush (stdout);
! 			    }
! 			    goto notify_groups_done;
! 		    }
! 		} else {	/*Ok so we all have bsearch don't we?*/
  
! 		    tgroup.name=buf;
! 		    found = (group_p*)bsearch((char*)&p_group,
! 			(char*)sorted_active,num_active,sizeof(group_p),
! 			cmp_group_p);
! 
! 		    if (found) {
! 			(*found)->visit=1;
! 			continue;
! 		    }
  		/*
  		 * Look for bogus groups 
  		 */
  		ch_default = 'y';
  			do {	
  				update_old_active= 1;
  				fputc ('\r', stdout);
  				CleartoEOLN ();
! 				printf (txt_delete_bogus_group, buf, ch_default);
  				fflush (stdout);
  				ch = ReadCh ();
  				if (ch == CR) {
***************
*** 685,691 ****
  	
  			switch (ch) {
  				case 'y':
! 					delete_group (old_active[j].name);
  					break;	   
  				case 'q':
  				case ESC:
--- 605,611 ----
  	
  			switch (ch) {
  				case 'y':
! 					delete_group (buf);
  					break;	   
  				case 'q':
  				case ESC:
***************
*** 698,703 ****
--- 618,650 ----
  			fflush (stdout);
  		}
  	}
+ 
+ 	if(!read_news_via_nntp) {
+ 	    for (i = 0 ; i < num_active ; i++) {
+ 		if(sorted_active[i]->visit == 1) continue;
+ 			update_old_active = TRUE;
+ 
+ 			/* 
+ 			 * auto-subscribe/unsubscribe logic 
+ 			 */
+ 			if (! prompt_subscribe_group (sorted_active[i]->name,
+ 				autosubscribe, autounsubscribe)) {
+ 				if (cmd_line) {
+ 					printf ("\r\n");
+ 					fflush (stdout);
+ 				}
+ 				goto notify_groups_done;
+ 			}
+ 
+ 	    }
+ 	}
+ 
+ 	if (cmd_line) {
+ 		fputc ('\r', stdout);
+ 		fflush (stdout);
+ 	}
+ 	CleartoEOLN();
+ 
  	
  	/*
  	 *  write active[] to ~/.tin/active (local spooldir)
***************
*** 730,744 ****
  	/*
  	 * Free malloc'd arrays
  	 */
- 	if (old_active != (notify_p) 0) {
- 		free ((char *) old_active);
- 		old_active = (notify_p) 0;
- 	}
- 
- 	if (sorted_old_active != (notify_p *) 0) {
- 		free ((char *) sorted_old_active);
- 		sorted_old_active = (notify_p *) 0;
- 	}
  
  	if (sorted_active != (group_p *) 0) {
  		free ((char *) sorted_active);
--- 677,682 ----



-- 
Steve Alvey 				Email: spa@galadriel.bt.co.uk	
BT Labs 				Phone: +44 473 643871
Re: TIN is a huge pig -- still -- IS THERE A FIX FOR THIS COMING?
#7450
Author: Karl Denninger
Date: Fri, 21 Jan 1994 06:05
29 lines
1900 bytes
In article <cliftonrCJx4Bt.B8r@netcom.com>,
Pope Clifton <cliftonr@netcom.com> wrote:
>Karl Denninger (karl@MCS.COM) wrote:
>: I am at my wits end.
>
>: If there is no fix for this sometime soon TIN gets tossed, perhaps
>: permanently, off MCSNet. 
>
>I don't know quite why you are having more problems than other sites. 
>Netcom also had a lot of problems.
>
>One of the Netcom support guys got a friend to come up with a patch and
>submitted it.  I think it is in testing for 1.2PL3, but that seems to be
>taking a while.
>
>I have dropped out of the maintenance cycle due to arthritis, but here is a
>copy of the patch.  I take no responsibility....  Also, you might have to
>make adjustments in applying it to 1.2PL1 which works better in many
>respects.

Ah!  A patch!  That's <exactly> what I was looking for.  Thanks VERY MUCH 
-- I will install and check it out here.

If I see 'ya in person some day, I owe you a beer at the nearest pub.

--
Karl Denninger (karl@MCS.COM) 	| MCSNet - First Interactive Internet and 
Modem: [+1 312 248-0900]	| Clarinet feed in Chicago.  Send email to
Voice/FAX: [+1 312 248-8649]	| "info@mcs.com" for more information.
tin is *slow* reading large newsgroups
#7451
Author: Corey Ashford
Date: Fri, 21 Jan 1994 06:29
34 lines
1520 bytes
We just installed tin on our machine here hoping to get something
better than rn.

Some of our newsgroups have a lot of articles on-line - one has
13,500.

When I enter that newsgroup in tin, it takes at least a couple of
minutes during the

Group comp.lang.ada...

phase, then about a minute during the

Threading articles...

phase.  Mind you, this happens even when there are only a few unread
articles.

Is there anything that can be done to speed this up?

Looks like I'll have to dump this thing if nothing can be done.

Otherwise, it's a nice newsreader.

Thx 4 n e help

- Corey

Internet: corey@verdix.com
Sneakernet: down_the_hall!right_at_the_mens_room!past_the_stain_on_the_wall!...
Verdix Western Operations
1600 N.W. Compton Drive, Suite #357
Aloha, OR 97006
ph# (503) 690-1116 x6710
Re: TIN is a huge pig -- still -- IS THERE A FIX FOR THIS COMING?
#7464
Author: Bruce Esquibel
Date: Fri, 21 Jan 1994 21:31
25 lines
1660 bytes
Karl Denninger (karl@MCS.COM) wrote:
: I am at my wits end.

: If there is no fix for this sometime soon TIN gets tossed, perhaps
: permanently, off MCSNet. 


What a loss to the world.

Just for the record, we use tin as the primary newsreader for our users,
offering trn and nn only if they request it. We pull the full feed from
uunet which is over the 7000 mark right now.

The average memory tin uses is between 1.8m and 2.7m per copy depending on
how many groups are subscribed to.

I don't know anything about a memory patch but I can tell you if you are
running tin under nntp, you screwed up there. We ran into the same problem
once when we were tinkering with it. Ended up with a version that used 20m+
and it kept growing.

The tin distribution has a whole section on nntp, read the words, understand
their meaning, live by them and everything will be right with the world.

bje@rci.ripco.com
Re: TIN is a huge pig -- still -- IS THERE A FIX FOR THIS COMING?
#7482
Author: Karl Denninger
Date: Sat, 22 Jan 1994 18:57
63 lines
3520 bytes
In article <CK0159.AG3@rci.ripco.com>,
Bruce Esquibel <bje@rci.ripco.com> wrote:
>Karl Denninger (karl@MCS.COM) wrote:
>: I am at my wits end.
>
>: If there is no fix for this sometime soon TIN gets tossed, perhaps
>: permanently, off MCSNet. 
>
>What a loss to the world.

You must be a few days behind Bruce.  I've integrated a few patches and
turned it back on.

>Just for the record, we use tin as the primary newsreader for our users,
>offering trn and nn only if they request it. We pull the full feed from
>uunet which is over the 7000 mark right now.
>
>The average memory tin uses is between 1.8m and 2.7m per copy depending on
>how many groups are subscribed to.

Wait until you have new groups added; you'll see what happens.  The problem
is not with feeds which are consistent -- it is with the reality that there
are constantly new groups coming online.

When that happens, TIN used to allocate a couple of new arrays in a
seriously inefficient manner, and then not deallocate the unneeded one when
it was done.

The result was a 10+MB core image.  Get a couple of those going and the
performance of the system goes straight to hell.

Now, once the user gets the groups add message, does it, and then runs TIN
again all is well in Denmark -- until the next time.  When you have <real>
load on your machines, though, you'll find that it only takes once that
three or four users fire up tin at roughly the same interval after a
newgroup is processed -- your server will get slagged.

>I don't know anything about a memory patch but I can tell you if you are
>running tin under nntp, you screwed up there. We ran into the same problem
>once when we were tinkering with it. Ended up with a version that used 20m+
>and it kept growing.

Nope.  I don't believe in NNTP for LAN connections. But that's a religious
war that is not appropriate for this group.  :-)

>The tin distribution has a whole section on nntp, read the words, understand
>their meaning, live by them and everything will be right with the world.
>
>bje@rci.ripco.com

BTW, the two patches posted here are compatible with a little work.  The
first one (resizing the arrays to malloc storage instead of using insane
blocks of core) helps a lot.  Add in the second patch (which removes the
second array botch) and you get <real> progress.  We're well under 2MB a
copy now, with a RSS of about 1.2 MB.  That's the solution.

The TIN maintainers should pick up and incorporate <both> of those patches.
They work and solve the problem admirably.

--
Karl Denninger (karl@MCS.COM) 	| MCSNet - Full Internet Connectivity (shell,
Modem: [+1 312 248-0900]	| PPP, SLIP and more) in Chicago and 'burbs.  
Voice/FAX: [+1 312 248-8649]	| Email "info@mcs.com".  MCSNet is a CIX member.
large memory requirements in newsreaders (was Re: TIN is a huge pig...)
#7498
Author: Russell Schulz
Date: Sun, 23 Jan 1994 22:22
24 lines
1833 bytes
karl@MCS.COM (Karl Denninger) writes:

> I have complained about the idea that newsreaders should assume it is ok to
> allocate 10MB of RAM for a single user before.  TIN makes this assumption.  
> 
> This is an <outrage>.

why?

who is forcing you to use tin?  how much did you pay for it?  for how
long a maintenance contract did you shell out your hard-earned cash?

if/when a package (this isn't specific to newsreaders, of course) has
all the features, and takes less memory/disk/time/whatever is scarce
that year, people will flock to it.

complaining that tin used to (or still does?) put only one item in
the References: header is one thing -- that affects everyone else
trying to thread.

but complaining to the world because free software doesn't work on your
machines?  just don't use it, and no one else will care.
-- 
Russell Schulz  russell@alpha3.ersys.edmonton.ab.ca  ersys!rschulz  Shad 86c
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads