procmail
[Top] [All Lists]

Re: speed/efficiency of INCLUDERC vs. actual recipe?

1997-03-29 19:44:18

Message has been automatically signed by PGPsendmail 1.4,
available from ftp.atnf.csiro.au:pub/people/rgooch


-----BEGIN PGP SIGNED MESSAGE-----

From: Philip Guenther <guenther(_at_)gac(_dot_)edu>
Date: Fri  Mar 28, 12:50pm

dummy(_at_)cyberpass(_dot_)net (Robert) writes:
My .procmailrc and all its includes are getting awfully large and I'm afraid
that, for the amount of mail I receive, it may be struggling to keep up.
So, in my goal towards higher efficiency, I ask this question:

How large is large?  100 lines?  1000?

% wc -l .procmailrc*
    1129 total
% egrep -v '^$|^[     ]*#' .procmailrc* | wc -l
     904

10,000?  As for it struggling
to keep up, do you have evidence of this, say, your mail server always
running a load greater than the number of cpus on it, with procmail
delivering to you being one of the processes running during those
periods?  So many CPU cycles are spent completely idle that I wouldn't
worry about it unless you've actually found the machine acting pokey
when you're receiving email.

No, I don't have evidence of this.  I calculate that I receive
approximately 180 messages/day (which is nothing) -- I'm only on 4 mailing
lists now.  However, once I resubscribe to the original 40 or so mailing
lists I was on, I expect this number to be about 10 times higher.  This is
only approximately one message per minute.  I guess you're right -- my
worries are probably unfounded.

Is it faster to put a INCLUDERC where I'd otherwise put the actual contents
of the recipe?

Yes.  Of course, if the conditions are such that it'll usually process
the recipe then it'll be a loss instead.

...
(You understand, the recipe between the {}'s is much, much longer and
hairier.)

How _much_ longer and hairier?

Here's the worst, so far:

:0w
*^TO(sorehand%[a-z0-9(_dot_)]*bitnet(_at_)cmsa\(_dot_)berkeley\(_dot_)edu|sorehand@([.a-z0-9]*ucsf.edu|ucsfvm\.bitnet))
{
        :0w:rsi.lock
        *(^subject: .*(linux|lex[- ]?mark|bio[- 
]*feedback|supplement|vitamins?|flax|gluocosamine|drum|bicycle|lexmark|court|judge|appeal)|B??(linux|lex[-
 ]?mark|bio[- 
]*feedback|supplement|vitamins?|flax|gluocosamine|drum|bicycle|lexmark|court|judge|appeal))
        |procmail_print
        :Ew
        *(^subject: .*mail|B??mail)
        {
                :0w:rsi.lock
                *(^subject: .*\<list|B??\<list)
                *(^subject: .*archive|B??archive)
                |procmail_print
                :Ew:rsi.lock
                *(^subject: .*filter|B??filter)
                |procmail_print
        }
        :Ew:rsi.lock
        *(^subject: .*left|B??left)
        *(^subject: .*hand\>|B??hand\>)
        *(^subject: .*writ|B??writ)
        |procmail_print
        :Ew:rsi.lock
        *(^subject: .*wrist|B??wrist)
        *(^subject: .*tend[io]nitis|B??tend[io]nitis)
        |procmail_print
        :Ew:rsi.lock
        *(^subject: .*(worker|\<wc\>)|B??(worker|\<wc\>))
        *(^subject: .*(hearing)|B??(hearing))
        |procmail_print
        :Ew:rsi.lock
        *(^subject: .*\<x\>|B??\<x\>)
        *(^subject: .*windows|B??windows)
        *(^subject: .*(reminder|break|typ)|B??(reminder|break|typ))
        |procmail_print
        :Ew:rsi.lock
        *(^subject: .*(anti[- ]*inflam)|B??(anti[- ]*inflam))
        *(^subject: .*natural\>|B??natural\>)
        |procmail_print
        :Ew:rsi.lock
        *(^subject: .*(anti[- ]*inflam|relief)|B??(anti[- ]*inflam|relief))
        *!(^subject: .*(ibu|relaf|nsaid)|B??(ibu|relaf|nsaid))
        |procmail_print
        :Ew:rsi.lock
        *(^subject: .*(static)|B??(static))
        *!(^subject: .*(posture|position)|B??(posture|position))
        |procmail_print
        :E:
        $PROCMAIL_TRASH
}

Philip Guenther


- -- 
mailto:dummy(_at_)cyberpass(_dot_)net                             In sunny 
Berkeley, CA
http://www.cyberpass.net/~dummy                        waiting for The Big One
Strengthen affirmative action: support quotas. <<   
  >> Ignorance isn't bliss -- it's good business. <<   (510) 464-4604


-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQB1AwUBMz3RFtCFOCNWKXb9AQG27wL+LHbJk9u2Yg8RiMEN6hf0aMOEAvNP30VM
vUyvZy2VCGhZ6wHiPY1Paqyx3Yhq0FbfpxNYls2bqWxz73GJzj1o/1EtEc0RP0po
TK8YgOpaPcRZkxaTSMWiKokCBNbNA+yU
=G1JL
-----END PGP SIGNATURE-----