IMAP: let mail retrieval scale better

Operating Systems / Haiku - Axel Dörfler [pinc-software.de] - 6 January 2015 08:26 UTC

- We now also maintain a mail index -> UID array in IMAPMailbox.
- Instead of fetching the message entries by a fixed range of UIDs, we use the message count, and get the entries by index.
- Likewise, in FetchHeadersCommand, we now get a list of UIDs rather than a range. This makes it possible to only download exactly the headers we want.
- Extended FetchCommand to be able to dynamically build a sequence list from a list of UIDs.
- Besides the suboptimal body fetching (one at a time, due to holes in the IMAP specification), we should now be able to retrieve the messages with pretty much optimal performance, while retaining an acceptable responsiveness to user requests.

4601929 IMAP: let mail retrieval scale better.
.../imap/IMAPConnectionWorker.cpp | 122 ++++++++++++--------
.../inbound_protocols/imap/IMAPConnectionWorker.h | 3 +
.../inbound_protocols/imap/IMAPMailbox.cpp | 29 ++++-
.../inbound_protocols/imap/IMAPMailbox.h | 10 +-
.../inbound_protocols/imap/imap_lib/Commands.cpp | 61 ++++++++--
.../inbound_protocols/imap/imap_lib/Commands.h | 9 +-
6 files changed, 168 insertions(+), 66 deletions(-)

Upstream: cgit.haiku-os.org


  • Share