Article View: news.software.nntp
Article #64514Re: Newsreader programming - sorting one million lines ?
From: Juergen Helbing
Date: Tue, 25 Mar 2003 05:56
Date: Tue, 25 Mar 2003 05:56
46 lines
2459 bytes
2459 bytes
blorg <blorg@usenet-invalid.to> wrote: >Agent will resort ~ 1,000,000 headers in less than a minute without >grabbing >40mb of memory the toughest resort IIRC is 'by subject' >and may take 1 minute or longer on that many headers. Yes, Agent does a great job. But from peeking into their file structure seven years ago I believe they are keeping indices in their idx files. So the 'time-consumption' is moved to 'update headers' (which can be very slow from my experience). >>How do you sort your header-lists if they dont fit into memory ? > >Use databases. Dont keep this much data in memory on a pc, it >doesn't work well. You are right - any kind of database might do the job. I'm just afraid that everything I'll try will be far slower than today - even for the same volume of data. >>Any ideas, tips, genuine disk sorting algorithms introduced since >>1979 and better/faster than B-Tree ? > >Doesn't B-Tree have enough throughput? I have a sheet of stats >if that would be helpful to you. I am already using a B-Tree for the MsgIds. It is very fast - but this method requires to maintain _all_ sorting indexes in seperate B-Trees (6 in my case). Updating all of them after header fetch and expiring them is very slow (compared to today :-) And creating a B-Tree every time just for sorting purposes would be possible but too slow. Inserting 1e6 entries into a B-Tree would take 1000 secs even if every insert operation would take only 1 milliSecond :-( After reading also the other replies it seems to be finally necessary to maintain full disk indices. A lot of programming ahead. Thanks for your answer. -- Juergen
Technical Details
Message-ID:
<53566.p33204@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!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.alt.net!usenetReferences:
<4540d.o33203@archiver.winews.net> <l9eu7v8vg7hcfi5130vv6v53sjevdsq5je@4ax.com>Show Full Headers
Complete Article Headers
Message-ID: <53566.p33204@archiver.winews.net> Subject: Re: Newsreader programming - sorting one million lines ? Date: Tue, 25 Mar 2003 05:56:53 +0000 From: archiver@i3w.com (Juergen Helbing) References: <4540d.o33203@archiver.winews.net> <l9eu7v8vg7hcfi5130vv6v53sjevdsq5je@4ax.com> 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!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.alt.net!usenet Newsgroups: news.software.nntp Organization: Altopia Corp. - Usenet Access - http://www.altopia.com Lines: 45 X-Newsreader: MyNews