http://bugzilla.spamassassin.org/show_bug.cgi?id=3954





------- Additional Comments From [EMAIL PROTECTED]  2004-11-05 15:26 -------
Subject: Re:  Make MIME::Base64 a required module

-1 (a) not entirely possible (b) unnecessary requirement (c) may be
   the wrong optimization

(a) Our base64->uuencode method is a well-known way to decode
    base64-encoded data (and the decoding itself is very fast in terms
    of perl ops).  More importantly, there are cases where we do that
    even when MIME::Base64 is available because MIME::Base64 doesn't
    decode malformed base64 like most common mail programs.

(b) It's fast enough as-is.  I took every single base64 spam I've
    received in the last 30 days (633 out of 9010) and base64 decoding
    without MIME::Base64 took 0.09% of time for those 633 messages, or
    0.006% of time for the entire set.

(c) It seems like it *might* even be faster without MIME::Base64 due to
    the contortions needed to use it.  Profiles done after running
    through the messages once:

Profile of the 633 messages with MIME::Base64:

  User+System Time = 110.4627 Seconds
Exclusive Times
%Time ExclSec CumulS #Calls sec/call Csec/c  Name
 0.16   0.178  0.177    576   0.0003 0.0003  
Mail::SpamAssassin::Util::base64_decode
 0.00   0.000 -0.000    546   0.0000 -0.000  MIME::Base64::decode_base64

Profile of the 633 messages without MIME::Base64:

  User+System Time = 110.0956 Seconds
Exclusive Times
%Time ExclSec CumulS #Calls sec/call Csec/c  Name
 0.09   0.094  0.094    576   0.0002 0.0002  
Mail::SpamAssassin::Util::base64_decode

That speed-up might not hold up for longer base64 regions such as
viruses and such that the parser could possibly be used to decode.  We'd
need to test it.

When I wrote the routine, I didn't really consider that MIME::Base64
might be slower, but I did optimize the hell out of it otherwise.  I
could look at further optimizations, but it's so low on the profile,
it's probably not worth the effort.





------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Reply via email to