procmail
[Top] [All Lists]

Re: deleting old mails

2005-10-05 14:52:14
Dallman Ross wrote:
in procmail, you'll need to be able to read in today's date from
a file.  You could generate it once daily via cron.  It would
contain, e.g.:
   TODAY = 20051005

   Would there really be that much of a performance hit using:

    TODAY = `date +"%Y%m%d"`

   instead of reading from a file?  After all, the recipe will
still have to spend some cycles loading the file data.

   I just ran a test on my system to check this, and my results are:
Reading from a file 10,000 times takes 29 seconds.
Using the date command 10,000 times takes 33 seconds.

   So, using the date command adds an additional 4 seconds
(on my slow system - 400mhz PIII w/ 7200RPM HD).  Typical
machines in production use today are going to be much faster,
and therefore have less of a difference in performance.

   I don't see this as enough of a performance hit to fuss with
adding a cron job just to dump out the date when the date
function will provide the same results.

   My two cents, anyway.

Brad/Mr Duck


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>