Article View: news.software.readers
Article #77680[slrn] esc-1 esc-p still slow
From: jurriaan kalkman
Date: Sun, 29 Apr 2001 17:57
Date: Sun, 29 Apr 2001 17:57
70 lines
4276 bytes
4276 bytes
I'm still experiencing excruciatingly slow action on using esc-1 esc-p to rebuild a complete thread in slrn --spool. I have a group with 25000 headers. Reconstructing a thread with 200 headers in that group takes more than 8 minutes. Reading the entire group and threading all headers takes 10 seconds. Since the second action does everything the first does, something is inefficient. Running slrn against a real server, not with --spool, also runs much quicker - I guess NNTP-servers have indexes to deal with these sort of requests. As far as I have been able to determine, slrn starts to reconstruct the thread and somewhere begins to read all headers, to check if the 'References:' header contains a certain id. This is repeated for all headers in the thread. I've been thinking of various options to resolve this. - create a gdbm msgid-to-artnum file. Didn't help. - create a file containing for each msg-id the articles that have this msg-id in the References: header. Not easy to build this into spool.c. - cache all overview information, the overview file for this group is only 9 Mb - grep can go through it in less than 5 seconds. - read all messages, then display only the part that normally would be displayed - copy the spool to a ram-disk every time I start slrn I would like to hear some expert opinions on what option would be the best according to these principles: - it should be fast - it should be an (compile-time) option - it may use a moderate amount of memory (16 Mb, more if that can be a compile-time option; I wouldn't mind sacrificing 64 Mb) I'd like to hear some pointers as to where to hack this into spool.c; the NNTP-protocol is too complex to barge right in. Here's some profiling information from gprof: Each sample counts as 0.01 seconds. % cumulative self self total time seconds seconds calls ms/call ms/call name 53.85 1.89 1.89 11053064 0.00 0.00 spool_read_line 13.96 2.38 0.49 1253322 0.00 0.00 spool_one_xhdr_command 12.25 2.81 0.43 10955218 0.00 0.00 slrn_case_strncmp 4.84 2.98 0.17 224444 0.00 0.00 spool_read_xover 4.27 3.13 0.15 1122878 0.00 0.00 slrn_strchr 2.56 3.22 0.09 1350383 0.00 0.00 spool_fclose_local 2.56 3.31 0.09 276 0.33 0.47 spool_read_xpat 1.71 3.37 0.06 1253866 0.00 0.00 slrn_snprintf 1.71 3.43 0.06 1253384 0.00 0.00 spool_open_article_num 1.14 3.47 0.04 1139152 0.00 0.00 spool_xpat_match 0.57 3.49 0.02 9 2.22 37.77 spool_find_artnum_from_msgid 0.28 3.50 0.01 186 0.05 0.05 slrn_rfc1522_decode_string 0.28 3.51 0.01 97 0.10 0.10 for_this_tree 0.00 3.51 0.00 6723 0.00 0.00 slrn_set_color As you can see, the problem is much too much reading for too little gain in spool_read_line. Thanks for thinking with me, Jurriaan -- Next: expostulation, fanciful rhetoric, and even the exchange of intemperate comments. Jack Vance - Throy GNU/Linux 2.4.4 SMP/ReiserFS 2x1743 bogomips load av: 0.42 1.12 1.57
Technical Details
Message-ID:
<slrn9eolh4.lma._hate_spam_thunder7@middle.of.nowhere>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!newsfeed.google.com!newsfeed.stanford.edu!skynet.be!newsfeeds.belnet.be!news.belnet.be!transit.news.xs4all.nl!no_spam_hereShow Full Headers
Complete Article Headers
Message-ID: <slrn9eolh4.lma._hate_spam_thunder7@middle.of.nowhere> Subject: [slrn] esc-1 esc-p still slow Date: Sun, 29 Apr 2001 17:57:52 +0000 From: _hate_spam_thunder7@xs4all.nl (jurriaan kalkman) 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!newsfeed.google.com!newsfeed.stanford.edu!skynet.be!newsfeeds.belnet.be!news.belnet.be!transit.news.xs4all.nl!no_spam_here Newsgroups: news.software.readers Organization: XS4ALL Internet BV Lines: 69 NNTP-Posting-Host: rivierenland.xs4all.nl X-Trace: news1.xs4all.nl 988567072 5322 194.109.14.47 (29 Apr 2001 17:57:52 GMT) X-Complaints-To: abuse@xs4all.nl NNTP-Posting-Date: 29 Apr 2001 17:57:52 GMT X-Face: b$-F+98,@$_I=*ODq'<K2(OA)qC&,(GP=z2^`4dwQwy&e;!|R?>")k9FH3?YC+%*kF\=<Rx"Hy2_eyMtnFSiO8 User-Agent: slrn/0.9.7.0-jwk (GNU/Linux)