Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chatmail: Delivery latency profiling #292

Open
s0ph0s-dog opened this issue Feb 17, 2025 · 1 comment
Open

Chatmail: Delivery latency profiling #292

s0ph0s-dog opened this issue Feb 17, 2025 · 1 comment

Comments

@s0ph0s-dog
Copy link
Contributor

This is part of a series of issues tracking chatmail support in Mox.

To improve the user experience of Mox as a chatmail server, I'd like to spend some time profiling the message delivery/acceptance pipeline. I'd like to see if there are any opportunities for me to improve the latency between when submission completes and when an idle IMAP client is notified that a new message is available. I don't know for sure if this will be fruitful, but I'd like to learn more about Go profiling. So, even if it isn't, it will still be a useful learning experience :)

@mjl-
Copy link
Owner

mjl- commented Feb 17, 2025

Indeed, sounds useful! I would start not with profiling, but by enabling trace-level logging and looking at what mox is doing, comparing timestamps/durations between log lines.

My hunch is that most time is spent on handling incoming smtp deliveries, due to spf/dkim/dmarc/spam-filtering checks, which involves making DNS requests (having a local caching recursive DNS resolver should help).

Submitting to the queue is less involved and I wouldn't expect many delays there, starting delivery from the queue should also not have any delays. Likewise for sending out the notification for IMAP IDLE connections.

Of course, this is just a hunch, and delays may be in unexpected or innocuous looking places.

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

No branches or pull requests

2 participants