procmail
[Top] [All Lists]

Why are body searches expensive?

1997-09-14 02:05:11
Of late there have breen several posts mentioning as gospel that searching
the body is more work for procmail than searching the head is.

I can see some reasons: usually the body is larger than the head, so there is
more text to look through; most head searches are anchored left, so if the
text at the start of a line doesn't match, procmail can jump ahead to the
next newline instead of plodding through the entire line; and since a filter
recipe may have just changed the size of the head, procmail cannot keep a
byte-count pointer nor a line-count pointer to where the body begins but must
scan through the head to find the blank line at the neck before it begins a
body search.

But I got the feeling that there's more to it than that.   Are there yet
other factors?

DWT

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