Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#19 Improve dkim_testfile() performance for large messages

v2.3.0
closed-fixed
3
2007-10-13
2007-10-08
Kaspar
No

As a reminder (following our private discussion): dkimf_testfile() currently uses strlcat to fill a buffer before handing that over to mlfi_body(). For larger messages, this seems to slow down things considerably (up to a factor of 60), compared to the way dkimf_debug() used to do things in previous releases.

Discussion

    • priority: 5 --> 3
    • assigned_to: nobody --> sm-msk
     
  • Logged In: YES
    user_id=1048957
    Originator: NO

    Try the attached patch. It replaces sm_strlcat() calls
    in message body processing with local length management
    and memcpy() which should be more efficient.

    The patch might take some manual massaging as it is
    based on test.c with one of the other patches also
    applied.

    File Added: PATCH

     
  • Proposed patch #1

     
    Attachments
  • Kaspar
    Kaspar
    2007-10-10

    Logged In: YES
    user_id=1854294
    Originator: YES

    Yes, that gets us back to speed again - thanks!

    For the record, these are typical figures (using "time") for verifying a 1.1 MByte message file with 2.3.0:

    real 0m4.048s
    user 0m3.997s
    sys 0m0.020s

    With the patch applied, they now drop again to values like

    real 0m0.077s
    user 0m0.059s
    sys 0m0.010s

    (i.e. always < 0.1s, while with vanilla 2.3.0 they are always > 4s)

     
  • Logged In: YES
    user_id=1048957
    Originator: NO

    v2.3.1 released, containing this patch.

     
    • status: open --> closed-fixed