https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6854

          Priority: P2
            Bug ID: 6854
          Assignee: dev@spamassassin.apache.org
           Summary: Optimizations, profiling
          Severity: enhancement
    Classification: Unclassified
                OS: All
          Reporter: mark.marti...@ijs.si
          Hardware: All
            Status: NEW
           Version: 3.4 SVN branch
         Component: Libraries
           Product: Spamassassin

Created attachment 5102
  --> https://issues.apache.org/SpamAssassin/attachment.cgi?id=5102&action=edit
The low-hanging fruit

Spent a day with a NYTProf 4.08 Perl profiler trying to cut down
some of the inefficiencies of SpamAssassin dealing with large mail
messages (which are usually large thanks to some Base64-encoded
attachments). Using Perl 5.16 on a FreeBSD 9.1 platform.

Picking just the low-hanging fruit with most outstanding hotspots in
each iteration, I managed to shave off about 100 ms of CPU-intensive
hotspots (local tests only) in a command-line spamassassin run
(with a 3 MB message containing a large PDF).

Depending on what is being measured (like aggregate mail throughput),
and what proportion of large messages are being passed to SpamAssassin
(like passing only the first 420 kB from amavisd to SpamAssassin),
this amounts to between 3 and 7 % of a speedup for large messages.
Not too bad where every bit adds up.

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

Reply via email to