We notice significant performance drop when using Mailkit IMAP, compared to Outlook or other email clients. I believe it is related to latency between issuing imap command and actual response from the server for some servers (yahoo, hotmail). For example yahoo imap - there is 1-3 sec delay between executing the command and getting back the response(tag FETCH 1 (BODY[])). We are trying to reduce amount of imap commands to speed up synchronization. Currently we use
GetStream method to download full messages and we execute this method for each message in the mail box. For mailbox with 200 emails that emit 200 imap fetch commands which stack up to 200-400sec delay only for getting response from the server(not accounting the actual data stream).
I can see commercial email clients like Outlook can achieve 10-20 times faster synchronization (when they are configured to download full messages (not only message summaries). I believe they download message bodies using batch like
tag FETCH 1:20 (BODY[])
Some performance figures for yahoo imap using console commands
tag FETCH 1 (BODY[]) - 6 sec to complete
tag FETCH 1:2 (BODY[]) - 7 sec to complete
tag FETCH 1:20 (BODY[]) - 11 sec to complete
tag FETCH 1:50 (BODY[]) - 25 sec to complete
It is clear it is much faster to download bodies on batch but I can't find a way to do this with Mailkit. I tripple checked the mailkit metods and can't find overload that allows me to do that. I would like to know how hard is to implement such overload myself or any advice how to speed up the synchronization with high latency servers?
We notice significant performance drop when using Mailkit IMAP, compared to Outlook or other email clients. I believe it is related to latency between issuing imap command and actual response from the server for some servers (yahoo, hotmail). For example yahoo imap - there is 1-3 sec delay between executing the command and getting back the response(tag FETCH 1 (BODY[])). We are trying to reduce amount of imap commands to speed up synchronization. Currently we use
GetStream method to download full messages and we execute this method for each message in the mail box. For mailbox with 200 emails that emit 200 imap fetch commands which stack up to 200-400sec delay only for getting response from the server(not accounting the actual data stream).
I can see commercial email clients like Outlook can achieve 10-20 times faster synchronization (when they are configured to download full messages (not only message summaries). I believe they download message bodies using batch like
tag FETCH 1:20 (BODY[])
Some performance figures for yahoo imap using console commands
tag FETCH 1 (BODY[]) - 6 sec to complete
tag FETCH 1:2 (BODY[]) - 7 sec to complete
tag FETCH 1:20 (BODY[]) - 11 sec to complete
tag FETCH 1:50 (BODY[]) - 25 sec to complete
It is clear it is much faster to download bodies on batch but I can't find a way to do this with Mailkit. I tripple checked the mailkit metods and can't find overload that allows me to do that. I would like to know how hard is to implement such overload myself or any advice how to speed up the synchronization with high latency servers?