Bokhan Artem wrote:
> Paul J Stevens пишет:
>> Bokhan Artem wrote:
>>  
>>> Paul, what for dbmail executes this query with imap "select Inbox"?
>>>     
>>
>> It retrieves the meta data for all messages in the mailbox involved.
>>   
> I suspect that metadata is cached by imapd and used in further imap
> queries... That is probably good for small mailboxes, but definitely
> kills system with real-life mailboxes. May be caching of meta of last N
> messages would be better...

Currently the cache indeed is build when a client opens the mailbox.

Several imap clients will issue something like 'x uid fetch 1:* (flags)'
to update their client-cache right after opening a mailbox. So rather
than wait for the 'fetch 1:*' command, the meta-data is retrieved as
soon as possible.

Also, some of this caching has to be done anyway, because the
SELECT/EXAMINE commands will return data that needs to be calculated and
tracked as session-local data. The state of the mailbox in the
data-store is - as much as possible - only used to synchronize
concurrently connected clients. We need to maintain a comprehensive
internal view of the mailbox, exactly to avoid doing unnecessary queries
later on.

I seriously doubt this will 'kill' your system, even for very large
mailboxes. I use this routinely on mailboxes > 5000 messages and it only
causes a minor delay when I first select the mailbox. And that's using a
very old 1.6GHz dual-xeon with 512mb ram.

So what you see is all building on my main use-case: thunderbird and
outlook accessing small or medium sized mailboxes < 10k messages. I'm
sure that using large or very large mailboxes combined with different
imap behaviour patterns in the client are better served by different
caching behaviour.

So as always, feel free to offer ideas how this might be improved.


-- 
  ________________________________________________________________
  Paul Stevens                                      paul at nfg.nl
  NET FACILITIES GROUP                     GPG/PGP: 1024D/11F8CD31
  The Netherlands________________________________http://www.nfg.nl
_______________________________________________
Dbmail-dev mailing list
[email protected]
http://twister.fastxs.net/mailman/listinfo/dbmail-dev

Reply via email to