At 11:06 AM 6/13/2005, Stefan Ewert wrote:
does anyone know about a option which speeds up spamassassin extremly:
order the tests: fastest first, getting slower , slowest is the last test in
the list (dns perhaps, razor, pyzor, dcc).
and now: stop testing the mail, as soon as spamscore is greater than
needed to
be marked as a spam mail.
i dont want to know if this mail has got 30 points, im just interested in a
decision between spam and not spam.
Doesn't work. It was tried a long time ago. It greatly slows down SA.
In order to do this without FPs you must run all negative score tests
first, then positive score tests.
Doing that slows SA down in the average case because you have to make
multiple passes over the message body.
Your approach would actually involve making half-a-dozen of passes over the
message body. Painfully slow in the average case.
Your approach also winds up eliminating the benefit of parallelization that
the current approach uses. SA starts the network checks FIRST, so that they
are running while SA runs other body checks. The total scan time winds up
being the time of the slowest network check, instead of the sum of all the
tests.
For example, if the slowest network test takes 4 seconds, and other network
tests take 3, 2, and the body scan takes 1 second. Wildly contrived
numbers, but good enough to make a point with.
In your approach a message would scan in 1+2+3+4= 10 seconds. Maybe you'll
get lucky and skip the last test, so your time will be 1+2+3 = 6 seconds.
The current approach would take 4 seconds in all cases, because the network
checks run in parallel with each other and the body scan. SA starts all the
network checks, then runs the body rules, then waits for the network check
answers.
In order to be faster you'd have to be lucky enough to skip two tests, and
then you'd be 3 seconds, a 25% speed improvement. But the normal case takes
2.5 times as long to run. On average, you'll probably wind up being about
half the speed.... Ouch.