[MlMt] What takes time at startup?

Benny Kjær Nielsen mailinglist at freron.com
Sat Feb 6 17:40:41 EST 2016


On 6 Feb 2016, at 22:03, Steven M. Bellovin wrote:

> I have 1.4M messages, and while startup takes a while it doesn't take 
> nearly as long as Patrik reports.

I've had reports about this number of messages before, but I'm still 
surprised it works at all with such a number of messages.

> On 6 Feb 2016, at 15:49, Patrik Fältström wrote:
>
>> 350k email messages is nothing.
>>
>> I have just below 2 million. 12k added each month, approximately.

I'm even more surprised this works although given the startup time one 
could claim that it doesn't really work.

>> There is something happening at startup that takes very long time. 
>> And I am interesting in knowing what happens.

I'll try to explain further below.

>> On 6 Feb 2016, at 19:43, Helen Holzgrafe wrote:
>>
>>>> Why does this work? My educated guess:
>>>>
>>>> My guess is that Mailmate somehow must be recreating the contents 
>>>> lists for each smart mailbox on the fly each time it starts up, 
>>>> rather than keeping that as part of its database all the time. Very 
>>>> time consuming at start up, but it does guarantee accuracy.
>>>>
>>>> [...]
>>>>
>>>> Benny, how close did I come to explaining this problem correctly?

That's very exact. MailMate stores a copy of all headers (and some 
virtual headers) of all emails and these are used on startup to build 
*all* mailboxes. It's not just smart mailboxes. An IMAP mailbox is a 
query for matches on a virtual header with a specific IMAP location.

Everything in MailMate is based on these queries and with more than a 
million messages then this can be slow on startup. It can also take up a 
considerable amount of memory.

Patrick: Now, 8 minutes is a lot and it could be interesting for me to 
see where the bottlenecks are for this kind of problem size. You can 
generate a log for me by pasting these lines in a Terminal window:

	defaults write com.freron.MailMate TimersEnabled -bool YES
	/Applications/MailMate.app/Contents/MacOS/MailMate

When the launch has finished then quit MailMate (to make MailMate 
summarize the results) and then send me the Terminal output. Send it off 
list.

(I cannot really promise to make more improvements soon, but there might 
be some simple things you can change to speed up the launch.)

-- 
Benny
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freron.com/pipermail/mailmate/attachments/20160206/9c6153e0/attachment.html>


More information about the mailmate mailing list