Folks, I have a large whitelist (380M) and this code is death when remove_entry is called:
if ($addr =~ /^(.*)\|ip=cmd$/) { # it doesn't have an IP attached. # try to delete any per-IP entries for this addr as well. # could be slow... my $mailaddr = $1; my @keys = grep { /^\Q${mailaddr}\E\|ip=(?:\d+\.\d+|none)$/ } keys %{$self->{accum}}; foreach my $key (@keys) { delete $self->{accum}->{$key}; delete $self->{accum}->{$key.'|totscore'}; } It takes about 5 minutes to run and 900M of swap, which backs everything else up behind it. Somebody tried to add about 50 blacklisted domains to our company-wide SpamAssassin, and wiped us out for an hour. I was thinking about taking a crack at this to rewrite the $addr store to pack all of the IP lookups in a single key, something like this: [EMAIL PROTECTED]|count cmd=0|10.1=9 [EMAIL PROTECTED]|totscore cmd=-5|10.1=215 etc. This requires the subclass to unpack the address and do some extra packing/unpacking, which I didn't particularly like. The other option was to maintain a seperate associated AWL which would contain a list of IPs that were associated so one could easily delete the keys without the grep having to run: [EMAIL PROTECTED] 10.1,10.2,209.212,... Any thoughts? Cheers, David. ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk