> That's something that a number of people have requested, but has two
> drawbacks: It requires lots of programming time to create, and lots of CPU
> time.

Hmmm...  Not to be a pest, but I'm wondering if this wouldn't actually
IMPROVE performance?

Simply substitute all spaces, symbols, SOL, EOL with '~' before running
your filter check.

EXAMPLE:
"Sex for free!!!" BECOMES "~sex~for~free~~~~"

RULE "free~" finds "free" "free!" "free." "free?" etc. but not "freedom"
or "freeze" -- all in one pass.  It covers STARTSWITH, CONTAINS, IS and
ENDSWITH in one shot.

RULE "~sex" finds "sex" "sexy" "sexiest" "sexaholic" "sex!!!" etc. but
not "Essex" or "unisex" -- all in one pass.  Again, operators
STARTSWITH, CONTAINS, IS and ENDSWITH are all covered.  One rule.

THE CONS:  The initial symbol substitution would eat some CPU cycles
(but only once per message -- not per rule).  Any rules that specify
symbols or spaces would need to be executed BEFORE string substitution. 
This would require two passes through the rules.  Skip '~' rules on pass
#1.  Skip non-'~' rules on pass #2.  That's quite a few cycles.  [Could
be reduced by forcing users to pre-group their rules into two sections
or two lists.]

THE PROS:  Fewer rules do more work.  Fewer rules = less CPU load.

So, the question becomes, if a filter list with 300 rules becomes 250
rules, are we ahead of the game?  Not to mention, the new rules might
now do the equivalent work of a 500-rule filter list.  Heck, are we
checking the BODY of the message?  That's fifty fewer passes on the
entire body of an e-mail message.  Bam!

I hope this is helpful and that I'm not being a nuisance.  Being that I
AM a programmer, this little puzzle is intriguing.

Oh, and I drink too much caffeine....

Dave

-- 

David M. Delbridge
President & CEO
Circa 3000
ColdFusion Hosting
http://www.circa3k.com
775-832-2445
---
[This E-mail was scanned for viruses by Declude Virus (http://www.declude.com)]

---
This E-mail came from the Declude.JunkMail mailing list.  To
unsubscribe, just send an E-mail to [EMAIL PROTECTED], and
type "unsubscribe Declude.JunkMail".  The archives can be found
at http://www.mail-archive.com.

Reply via email to