Skip to content

JAMES-3196 Avoid MDC costs when not needed - #667

Merged
chibenwa merged 1 commit into
apache:masterfrom
chibenwa:JAMES-3196-mdc
Sep 28, 2021
Merged

JAMES-3196 Avoid MDC costs when not needed#667
chibenwa merged 1 commit into
apache:masterfrom
chibenwa:JAMES-3196-mdc

Conversation

@chibenwa

Copy link
Copy Markdown
Contributor

Screenshot from 2021-09-22 16-46-20

Before we pay the cost of building MDC for each line of the message, which is useless upon copying the content (won't log in the enclosing context).

Significant performance gains can be achieved by only wrapping the final operation in the MDC:

Screenshot from 2021-09-22 16-48-18

Run locally, to generate the load:

time smtp-source -A -C100 -r 1 -l 500000 -m 5000 -s 20 -d -c -f any@other.com -M other.com -t bob@localhost localhost:25

Which sends 5000 emails of 500KB each...

Before it takes 2 min 30, and the SMTP receival goes at the same speed than the dequeuing

After, it takes 1min40, ~1min to enqueue and 40 more seconds so complete the dequeue...

@chibenwa chibenwa self-assigned this Sep 23, 2021
@chibenwa
chibenwa merged commit d1267f0 into apache:master Sep 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants