SA Bugzilla – Bug 3685
[review] uri and rawbody rules can exit earlier
Last modified: 2004-08-14 14:30:19 UTC
I was just poking around the code and found at least URI and rawbody rules can exit earlier. Right now, the RE is run against *all* URIs/paragraphs in a message, even if a hit has already occured (ie: there's a foreach(@_){} with no "last;" statement). We did this for body rules in 3.0, we should do it for URI and rawbody as well.
I'm breaking my own rule of "no more enhancements for 3.0", but I feel this is actually us not completing what we should have done before.
Created attachment 2251 [details] adds a "last" to rawbody + uri foreach() loops on hit
ok, I just copied the 2 lines from the body section to rawbody and uri. I checked the other test types: body already exits on a hit (previous comment), full is a single scalar RE against pristine_body, and header is a scalar RE against the appropriate header(s). the eval tests do their own thing. please review + vote. :)
+1
Subject: Re: rules can exit earlier +0.5 benchmark on ham and spam, please :-)
Subject: Re: [review] uri and rawbody rules can exit earlier On Sat, Aug 14, 2004 at 04:10:46PM -0700, bugzilla-daemon@bugzilla.spamassassin.org wrote: > +0.5 benchmark on ham and spam, please :-) I did a quick benchmark, just for you. :) Ran against the same 5000 ham + 5000 spam pre and post patch. Total time pre-patch 11:17, total time post-patch 11:15, for a 0.3% speed increase. Same results pre and post. I figured there wouldn't be a big time win overall. There are a total of 66 rules, rawbody (30)/uri (36), versus the 511 body rules in 3.0, so that was obviously a much bigger win.
committed. r36405
Subject: Re: [review] uri and rawbody rules can exit earlier For the record... +1 although I suspect most of the improvement was just caching of the files... I just wanted to make sure there wasn't some adverse effect given where we are. ;-)