Ask for the unread count, not the whole folder tree

Performancekamo-internal
Shipped
August 14, 2026 at 4:51 AM UTC
Author
kamo
Commit
f0264ac

The mail badge needs one integer and was fetching every folder in the mailbox to find it, which on the IMAP providers is the most expensive call the mail backend makes. EmailService now exposes the single-folder unread count that MailReader has always been able to answer with one STATUS. This is the fallback the badge uses when its unread socket has failed or gone quiet, so it was at its most expensive exactly when something was already wrong.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing