Thread View: news.software.readers
3 messages
3 total messages
Started by Troy Cauble
Wed, 19 Jun 1996 00:00
TIN slow entering specific group
Author: Troy Cauble
Date: Wed, 19 Jun 1996 00:00
Date: Wed, 19 Jun 1996 00:00
24 lines
1133 bytes
1133 bytes
Hi, I'm running tin 1.22 and it's extremely slow when entering one specific group, comp.lang.java. It is not slow on start up or any other time. I ran it with a performance/analyzer tool and found that it spent <9 seconds in make_threads and >280 seconds "waiting in _read". But the Netscape newsreader reads and indexes this group rather quickly. I've tried some xover patches posted by billy@mix.com (there were a lot of bad overview messages), but it didn't help the speed problem. I'm reluctant to move to 1.3 until it's out of beta. Any tips would be appreciated. -troy
Re: TIN slow entering specific group
Author: Urs Janßen
Date: Wed, 19 Jun 1996 00:00
Date: Wed, 19 Jun 1996 00:00
36 lines
2088 bytes
2088 bytes
In <4q94n1$lsc@nntpb.cb.lucent.com> Troy Cauble <troy@molson.ho.att.com> wrote: � I'm running tin 1.22 and it's extremely slow when entering � one specific group, comp.lang.java. It is not slow on � start up or any other time. comp.lang.java is a high traffic group and threading in tin 1.2pl2 is slow... � (there were a lot of bad overview messages), but it � didn't help the speed problem. I'm reluctant to move � to 1.3 until it's out of beta. sure you could stick to tin 1.2pl2 till 2005 (Iain isn't working on tin for 10 month now) - but I suggest to switch to tin 1.3beta, it is more stable and has fewer bugs than 1.2pl2... or even better, switch to tin 1.3 unoff (yes, it's in beta too, but comes up with more features and bugfixes as the normal beta version) - both tin 1.3 beta and 1.3 unoff beta do subject-threading about 10 times faster than 1.2pl2 does, the unoff version also comes up with reference-based-threading (which is as slow as the subject- threading in tin 1.2pl2, but that will change when hashing is implemented). tin1.3beta could be found at ftp://ftp.scn.de/pub/news/clients/tin tin1.3unoff could be found at: ftp://ftp.akk.uni-karlsruhe.de/pub/tin/ urs -- Jef Poskanzer: "When people aren't stupid Usenet is even more useful. Too bad this happens so rarely."
Re: TIN slow entering specific group
Author: billy
Date: Thu, 27 Jun 1996 00:00
Date: Thu, 27 Jun 1996 00:00
140 lines
5029 bytes
5029 bytes
Troy Cauble <troy@molson.ho.att.com> writes:
> I'm running tin 1.22 and it's extremely slow when entering
> one specific group, comp.lang.java. It is not slow on
> start up or any other time.
> I ran it with a performance/analyzer tool and found that
> it spent <9 seconds in make_threads and >280 seconds
> "waiting in _read".
When tin opens a group it creates a file on the /tmp device
then stuffs all the data from the server in it (as tin can't
throttle these data at this point) then reads them back one
record (line) at a time to actually process them. Thus the
speed of the /tmp filesystem is significant here - but you
don't have this trouble elsewhere...
I'd look at the data as arriving from the server - if they
pause, everything else has to wait.
I'd also check the entry for this group in the .newsrc file.
If there's something in the seen articles data which could
result in a negative number that could be a problem. Or
perhaps open the group, catch up, exit the group then trying
opening it again, which will clean up the seen arts data.
Bad xref data in one or more articles might be a possible
cause of this. I've also seen one instance where a message
ID longer than 100 bytes would cause the server to hang.
The point being it might be something strange like this -
if it is and you discover exactly what, please let me know.
Looking at how much memory is used may provide a clue here.
As for the time spent sorting - this can be greatly sped up
by applying the appended patch. It won't fix the sluggish
read, but it's well worth it in any case.
Billy Y..
>From: skhuang@csie.nctu.edu.tw (Shih-Kun Huang)
Newsgroups: news.software.readers
Subject: patch to make tin threading faster
Date: 17 Jan 1995 19:23:23 GMT
Organization: Dep. Computer Sci. & Information Eng., Chiao Tung Univ., Taiwan, R.O.C
The following patch is a little modification for tin122's make_thread
to speed up "making thread" from O(n^2) to O(n) at the expanse of one
extra integer for each "hash node".
Two files art.c and hashstr.c are modified and the modifications
are wrapped with "FAST_THREADING".
This patch has been tested by many users for months and you will
save a lot of time waiting for threading when number of articles
in a group is large.
A reference test,
number of articles in a group: 7445
not patched -> grouping: 10 seconds, threading 19 seconds
patched -> grouping: 10 seconds, threading less than 1 second.
---------------------------------------------------------------------
diff -rus tin/art.c ntin/art.c
--- tin/art.c Tue Nov 29 09:51:23 1994
+++ ntin/art.c Tue Nov 29 09:51:16 1994
@@ -462,9 +462,27 @@
}
*/
for (i = 0; i < top; i++) {
+#ifdef FAST_THREADING
+ int j, *aptr;
+#endif
if (arts[i].thread != ART_NORMAL || IGNORE_ART(i)) {
continue;
}
+#ifdef FAST_THREADING
+ aptr = (int*)arts[i].subject;
+ aptr -=2;
+ j = *aptr;
+ if (j != -1 && j < i) {
+ if (! IGNORE_ART(i) && arts[i].inthread == FALSE &&
+ ((arts[i].subject == arts[j].subject) ||
+ ((arts[i].part || arts[i].patch) &&
+ arts[i].archive == arts[j].archive))) {
+ arts[j].thread = i;
+ arts[i].inthread = TRUE;
+ }
+ }
+ *aptr = i;
+#else
for (j = i+1; j < top; j++) {
if (! IGNORE_ART(j) && arts[j].inthread == FALSE &&
((arts[i].subject == arts[j].subject) ||
@@ -475,6 +493,7 @@
break;
}
}
+#endif
}
}
diff -rus tin/hashstr.c ntin/hashstr.c
--- tin/hashstr.c Tue Nov 29 09:51:23 1994
+++ ntin/hashstr.c Tue Nov 29 09:51:16 1994
@@ -32,7 +32,6 @@
struct t_hashnode *table[HASHNODE_TABLE_SIZE];
-
char *
hash_str (s)
char *s;
@@ -85,8 +84,14 @@
p = (struct t_hashnode *) my_malloc ((unsigned) sizeof (struct t_hashnode));
p->next = (struct t_hashnode *) 0;
+#ifdef FAST_THREADING
+ iptr = (int *) my_malloc ((unsigned) strlen (s) + sizeof (int)*2 + 1);
+ *iptr++ = -1;
+ *iptr++ = -1;
+#else
iptr = (int *) my_malloc ((unsigned) strlen (s) + sizeof (int) + 1);
*iptr++ = -1;
+#endif
p->s = (char *) iptr;
strcpy (p->s, s);
return (p);
@@ -118,7 +123,11 @@
next = p->next;
if (p->s != (char *) 0) {
iptr = (int *) p->s;
+#ifdef FAST_THREADING
+ iptr-=2;
+#else
iptr--;
+#endif
free ((char *) iptr);
}
free ((char *) p);
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