procmail
[Top] [All Lists]

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

1997-03-28 11:53:19
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?  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.


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?


P.S. Maybe a good grad student project: a procmail compiler where a gigantic
    DFA could be built from all the recipes.  This might speed things up...

You need to check your CS books again: you need a full Turing machine to
emulate procmail processing a procmailrc.  A DFA is not nearly powerful
enough.

Anyway, flexibility and _maintainability_ is *much* more important.

Philip Guenther