james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Norman Maurer <nor...@apache.org>
Subject Re: [IMAP] Design flaws / Performance problems
Date Sat, 19 Jun 2010 16:06:54 GMT
Hi all,

I did a prototype to store the unseen message count and message count
in the Mailbox at it really improve performance. I will try to code
something generic. (I only tested JCR yet).

Bye,
Norman


2010/6/18 Norman Maurer <norman@apache.org>:
> Hi Eric,
>
> yes this is true for all folders not just for INBOX (this was just and
> example). About the size field I think that make sense. This would
> allow to add quota support on top easily.
>
> For my second point I made a mistake. its not the first recent
> message. Its the first unseen message. Our implementation is here:
>
> http://svn.apache.org/viewvc/james/imap/trunk/store/src/main/java/org/apache/james/imap/store/StoreMessageManager.java?view=markup
> (line 433)
>
> You can read the relevant part for this in the rfc3501 6.3.1 Select Command.
>
> As you can see the select command is really "expensive".
>
> Bye,
> Norman
>
>
> 2010/6/17 Eric Charles <eric@u-mangate.com>:
>> Hi Norman,
>>
>> I suppose it is applicable to all folders (Sent, Trash,...) and subfolders
>> of INBOX (for example) ?
>> Could we also have the same logic for the size field ?
>> About your second point (the first recent message), I don't find my way. Why
>> is it needed by imap and where is it implemented ?
>>
>> Tks,
>> Eric
>>
>>
>> On 06/17/2010 06:38 PM, Norman Maurer wrote:
>>>
>>> Hi all,
>>>
>>> after testing a bit around with current version of imap I noticed some
>>> design flaws. These flaws just kick in when you have a lot of mail and
>>> slow things down.. So here is what I found and how I would like to fix
>>> it:
>>>
>>> 1) When selecting a Mailbox (a select INBOX) the count of all messages
>>> and the count of all recent messages get calculated on the fly. That
>>> works well on small mailboxes, but as more messages you have as slower
>>> it get.
>>> I would like to store the messageCount and recentMessageCount in the
>>> Mailbox and just update these on append/setFlags/expunge operations.
>>> To be sure we don't get corrupted data somehow, we should create some
>>> kind of backgroundprocess which recalculate these counts every X
>>> hours.
>>>
>>> 2) When selecting a Mailbox (a select INBOX) we need to get the first
>>> recent message. For this we fetch ALL recent messages and just return
>>> the first after that.
>>> I think we should just fetch 1 message, because we only need one!
>>>
>>> Thats it for now..
>>>
>>> WDYT ?
>>>
>>> Bye,
>>> Norman
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
>>> For additional commands, e-mail: server-dev-help@james.apache.org
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-dev-help@james.apache.org
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message