imapc fetch optimization
Timo Sirainen
tss at iki.fi
Mon May 4 15:47:44 UTC 2015
On 04 May 2015, at 18:45, Timo Sirainen <tss at iki.fi> wrote:
>
> On 04 May 2015, at 16:59, Nagy, Attila <bra at fsn.hu> wrote:
>>
>> Hi,
>>
>> On 05/04/15 10:59, Timo Sirainen wrote:
>>> On 28 Apr 2015, at 23:49, Nagy, Attila <bra at fsn.hu> wrote:
>>>> Hi,
>>>>
>>>> imapc does a lot of UID FETCH $UID (BODY.PEEK[]), which is nice, because it works even with the dumbest IMAP server, altough it really kills performance, especially on high latency lines.
>>>>
>>>> I wonder: if IMAP servers can effectively handle boundless fetches (like a list with all wanted UIDs, or simply 1:* if all are needed), do you see this as a good addition to develop?
>>> Set mail_prefetch_count = 10 or 100 or something and it'll do larger FETCHes. The higher the value, the more memory/disk space is used for storing the received mails.
>>>
>> I'm aware of that, but it doesn't, or at least not always.
>> For example Thunderbird issues this:
>> 13 UID fetch 333574:333601,333630:333801 (UID RFC822.SIZE FLAGS BODY.PEEK[HEADER.FIELDS (From To Cc Bcc Subject Date Message-ID Priority X-Priority References Newsgroups In-Reply-To Content-Type Reply-To)])
>> Dovecot does this to the IMAP backend
>> 18 UID FETCH 333574 (BODY.PEEK[])
>
> Oh, there were several bugs related to that. Fixed:
>
> http://hg.dovecot.org/dovecot-2.2/rev/8f20aa806bcc
> http://hg.dovecot.org/dovecot-2.2/rev/d350a23207c2
> http://hg.dovecot.org/dovecot-2.2/rev/8c49fb6d789b
Also if you want imapc to use the full set of features with latest Dovecot, use:
imapc_features=rfc822.size fetch-headers search
After that it shouldn't be fetching BODY.PEEK[] anymore unless the body was actually wanted to be fetched.
More information about the dovecot
mailing list