Article View: news.software.nntp
Article #64509Newsreader programming - sorting one million lines ?
From: Juergen Helbing
Date: Mon, 24 Mar 2003 12:40
Date: Mon, 24 Mar 2003 12:40
47 lines
2411 bytes
2411 bytes
This is not a server question, but it is about nntp-software. So I hope that it is on-topic here: Binary Usenet has meanwhile newsgroups with more than 50.000 messages per day. So a retention of 30 day in a newsreader would cause a header-list of 1.500.000 messages. Sorting header lists by date, subject line and/or from is necessary (and sorting by subject is also needed for joining multiparts). Until now I am cutting the header-list to the 150.000 newest msgs - but this causes often problems - especially if someone does not read a group for one week..... I'm still keeping the 150.000 msgs in memory (approx. 30-70 MB) where sorting is easy - even if it is not too fast with quicksort or heapsort. A first test-run with 500.000 msgs shows me that sorting them takes up to one minute - and if there is not enough memory in the computer and swapping begins then sorting takes forever. I'm not yet keeping sorting indices for subject, date, author, msgid(sending host), filename, size, line, available server. And introducing them (and updating them - again very slowly - at every header fetch) would cause both - disk space and time and effort for expiry........ Reducing the amount by detecting - and eliminating - multiparts would not be a solution for me. So here finally my question: How do you sort your header-lists if they dont fit into memory ? I believe that sorting "1.500.000" lines simply by 'users-click' is a very demanding job - and such quantities appear only on the binary usenet today.... Any ideas, tips, genuine disk sorting algorithms introduced since 1979 and better/faster than B-Tree ? TIA -- Juergen
Technical Details
Message-ID:
<4540d.o33203@archiver.winews.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!feed2.news.rcn.net!rcn!wn14feed!worldnet.att.net!207.14.113.17!news.alt.net!usenetShow Full Headers
Complete Article Headers
Message-ID: <4540d.o33203@archiver.winews.net> Subject: Newsreader programming - sorting one million lines ? Date: Mon, 24 Mar 2003 12:40:45 +0000 From: archiver@i3w.com (Juergen Helbing) Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!feed2.news.rcn.net!rcn!wn14feed!worldnet.att.net!207.14.113.17!news.alt.net!usenet Newsgroups: news.software.nntp Organization: Altopia Corp. - Usenet Access - http://www.altopia.com Lines: 46 X-Newsreader: MyNews