procmail
[Top] [All Lists]

efficiency question

2002-04-23 12:11:34
Hi all,

Just a quick question about how procmail handles pattern-matching
in recipes with more than one condition...  does the message get
searched from the beginning for each condition within a recipe?  
Or are the conditions somehow done in parallel?  What i'm getting 
at, is it any more efficient (in terms of CPU time) to try to 
combine multiple simple recipes into a single, though more 
complex, recipe?  E.g. this:

:0
* condition A
{ action A }
:0
* condition B
{ action B }
:0
* condition C
{ action C }

=== versus something like this:

:0
* 0^1 condition A
* 0^1 condition B
* 0^1 condition C
{ some fancy code to determine which actions to take }


I'd imagine that the most efficient would be something like:

:0
* (condition A|condition B|condition C)
{ fancy actions }

since it probably only scans the message once (?), but i'd think
that not all recipes could be easily combined in such a way.


Sorry if this is an ignorant or too-vague question, but i'm 
curious about how to approach optimization of a large rc file.

Thanks in advance,
-Matt

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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