[Mimedefang] SpamAssassin via mimedefang is slow
David F. Skoll
dfs at roaringpenguin.com
Fri Nov 7 10:24:09 EST 2008
Daniel Bourque wrote:
> my $mail = $spamtest->parse(\@message,0);
> my $status = $spamtest->check($mail);
> my $hits = $status->get_hits;
> my $req = $status->get_required_hits();
> my $names = $status->get_names_of_tests_hit();
> my $report = $status->get_report();
> return($hits, $req, $names, $report);
That will leak memory like you wouldn't believe. You need
to call:
$mail->finish();
$status->finish();
before returning. If it happens that those are what's taking a long time,
then your fix may make spamassassin run faster... at the cost of leaking
memory like a sieve and littering /tmp with thousands of files. :-(
Regards,
David.
More information about the MIMEDefang
mailing list