Article View: news.software.nntp
Article #64512Re: Newsreader programming - sorting one million lines ?
From: greg andruk
Date: Mon, 24 Mar 2003 21:50
Date: Mon, 24 Mar 2003 21:50
17 lines
2172 bytes
2172 bytes
archiver@i3w.com (Juergen Helbing) writes: > So here finally my question: > How do you sort your header-lists if they dont fit into memory ? Look on Google for tape-sort and merge-sort. The basic idea is to break the data into chunks that fit into memory, sort and save them into temporary files, then merge the chunks back together to obtain your complete sorted list. The more tape drives you have, the faster you can sort. You can use disk files instead of scratch tapes, but that's cheating. There are quite a few variations on this idea. You might also consider using a database with multiple indexes, this could be easier but maybe slower if you end up generating indexes that are rarely used.
Technical Details
Message-ID:
<m28yv4304d.fsf@meowing.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!snoopy.risq.qc.ca!chi1.webusenet.com!news.webusenet.com!cyclone1.gnilink.net!spamkiller2.gnilink.net!nwrdny01.gnilink.net.POSTED!53ab2750!not-for-mailReferences:
<4540d.o33203@archiver.winews.net>Show Full Headers
Complete Article Headers
Message-ID: <m28yv4304d.fsf@meowing.net>
Subject: Re: Newsreader programming - sorting one million lines ?
Date: Mon, 24 Mar 2003 21:50:29 GMT
From: greg andruk <gja@meowing.net>
References: <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!snoopy.risq.qc.ca!chi1.webusenet.com!news.webusenet.com!cyclone1.gnilink.net!spamkiller2.gnilink.net!nwrdny01.gnilink.net.POSTED!53ab2750!not-for-mail
Newsgroups: news.software.nntp
X-Face: ')Fflcs!^R}Ds420ESFBO$}^v}i=A9jhnT\3.x#V)XnBrjF8FDwO).{#sN<#bI#A0Y-IU>I iz^}DhL#8nvP8,Ef*_4tdZUl#gwDK=7]>l"53tML>J1S8!)4vsDuy8j0]Rx
X-No-Repost: yes
Injector-Info: http://www.halfbakery.com/idea/Tarantula_20injector
Mail-Copies-To: nobody
X-Meow: Wouf
Organization: none
User-Agent: Gnus/5.090015 (Oort Gnus v0.15) XEmacs/21.4 (Portable Code)
X-Draft-From: ("news.software.nntp" 14001)
Cancel-Lock: sha1:ODqmY8G0vMYETJSolkgYD0BL14Q=
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Lines: 16
NNTP-Posting-Host: 68.160.182.40
X-Complaints-To: abuse@verizon.net
X-Trace: nwrdny01.gnilink.net 1048542629 68.160.182.40 (Mon, 24 Mar 2003 16:50:29 EST)
NNTP-Posting-Date: Mon, 24 Mar 2003 16:50:29 EST