decoding implementation

David Relson relson at osagesoftware.com
Mon Nov 25 14:38:11 CET 2002


At 01:20 AM 11/25/02, Gyepi SAM wrote:


>Like I said, it would be difficult, especially if we're going to portability.
>
> > If and only if we know by our options we might need to rewind AND stdin
> > is not a regular file, then copy it to the temp file as we're reading
> > (like tee(1) would do), and on the second go, read from the temp file.
>
>This is a good idea.

Hi Gyepi,

I've been watching the messages about this and waited til my thoughts gelled...

If the '-p' (passthrough) option has been specified, bogofilter keeps a 
copy of the message in memory.  Nobody thinks this is excess memory use.  I 
think we can afford to have a second, decoded copy of the message in memory.

The worst thing that is likely to happen is that the operating system runs 
out of ram and has to swap to disk.  If we store the decoded message on 
disk _by design_, then we are _always_ incurring the disk cost.  The 
tradeoff between memory and file seems to be whether to use the disk (if 
necessary) or to use the disk (always).

My vote is "disk, if necessary".

David






More information about the bogofilter-dev mailing list