procmail
[Top] [All Lists]

Re: [Q] Trying to improve procmailrc by /bin/true

2002-02-13 20:04:44
Udi Mottelo <uuddii(_at_)eng(_dot_)tau(_dot_)ac(_dot_)il> writes:
Prompt# time cat yoramg > /dev/null

real    0m0.046s
user    0m0.000s
sys     0m0.040s

Prompt# time cat yoramg | /bin/true

real    0m0.005s
user    0m0.010s
sys     0m0.000s

The second of those fails to account for the time spent creating the
pipe and forking and execing the extra process.


      In the last command the time is independenced on the file size
      because the right side of the pipe will send the interrupt as it
      finish.   I try this:
...
:0 fb
* sarit
| /bin/true

What's the 'f' flag doing there?  And doesn't 'h' make more sense than 'b'?
Perhaps you meant to write:

        :0 ih
        * sarit
        |/bin/true

However, as long as you're not using multiple rcfiles on the command
line, the fastest way to drop the message in procmail is to misset the
HOST variable, ala:

        :0
        * sarit
        { HOST }


      Any idea?  Is procmail has a keyword to say "drop the message"
      instead sending it to /dev/null?   Drop message with size ~50M 
      will takes about 0.100s  while pipe it to /bin/true still takes
      the same 0.006s. 

Adding the 'h' flag to the /dev/null delivery should drop its time to
a small constant.  Or use the HOST assignment trick.  (Do you really
discard so many messages that less than a tenth of second per-discard
really matters?  You must be discarding thousands of messages!)


Philip Guenther
_______________________________________________
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>