At 16:32 16-01-99 +0200, Jari Aalto+mail.procmail wrote thus:
May I propose 4 times faster and less resource expensive way:
You don't want to record anything unnecessary if this is straight
mailing list drop-in.
Agreed that your code would execute faster, although I still would execute
it WITHOUT condition, at the top of my .procmailrc. I'll look to changing
mine to your form when it is convenient.
However, for _just_ this one mailinglist rule which I was responding to in
a generic way, only FROM is needed, although I copied a standard set of
variables that didn't need to be there. Doing these once at the top of
procmail exectiton reduces unnecessary duplication of code througout recipe
modules - if you always can rely on FROM or SUBJECT or whatever already
being defined, then you don't have to worry about obtaining it again (or
concerning yourself with the order of certain rules that may or may not
initialize it). In some cases (copy flag, or rules which eventually fall
out because some other condition proves false), one can expect that some
definitions might be multiply executed anyway.
On the most basic of rules that may never make use of them, yes, too much
overhead, in which case one would copy what they need. For more complete
implementations of procmail usage for mail filtering (certainly ones which
check for spam, which invariably will deal with many of the variable
initializations multiple times), I believe an established central variable
initialization will generally prove more efficient over time.
---
Please DO NOT carbon me on list replies. I'll get my copy from the list.
Sean B. Straw / Professional Software Engineering
Post Box 2395 / San Rafael, CA 94912-2395