Apple Mail opening slowly

Some time I would say in the past couple months, not obviously around say a macOS upgrade but I just can’t say for sure, I noticed that Apple Mail is taking a long time to load. Typically it takes about 15 seconds to open but sometimes it takes closer to 20 seconds. That, in and of itself, doesn’t bother me as once it loads it is usually on for a long time after that and it runs quite normally. It just takes a long time to load. My concern would be if this long load is indicating some bigger issue where my Apple Mail might crash one day soon. I have a lot of stored mail. I recently looked at the size of the Mail folder and it is about 13 GBytes. I known it to be bigger on other Mac deployments so that is likely still an ok size. But…???

Might this slow load have something to do with SpamSieve??? I was reading a similar thread on this forum but was asked to go ahead and open a new one.

What do I need to do to just disconnect SpamSieve such that I can load Mail without it calling SpamSieve??? And then see how fast Mail opens without SpamSieve present. Can I just click on the “Uninstall Apple Mail Plugin” that I see in the SpamSieve pulldown??? And then what, reinstall SpamSieve again??? I always keep the installers so I have the most recent SpamSieve installer and several other older ones too.

And last, I’ve heard about this “Sample Process” technique in Activity Monitor but I don’t know how one could do that for Apple Mail when the concept is to try to monitor Apple Mail when it goes from not running to running. But when it’s not running it does not show up in Activity Monitor so how would one find it in short order once it starts running to highlight it and then click to run the “Sample Process” routine???

I’m not exactly sure what you’re worried about here. Usually if Mail crashes, you can just relaunch it, and everything will be fine. Your messages are stored in individual files and written to in a way that there shouldn’t be any data corruption even if Mail crashes. If Mail’s database gets damaged, it can be rebuilt from the message data. Regardless of whether Mail is acting funny, you should still have a backup.

In any case, I don’t think there’s a connection between launch time and Mail crashing.

There’s no such thing as an OK or not OK size.

As I said in the other thread, I recommend that you measure what’s happening so that we can take a look at what Mail is doing, rather than speculate.

Yes, you could do that. It’s possible that the problem will go away and not come back when you reinstall. It’s also possible that it will go away and then come back, and then you’ll be back at square one where I ask you to record a sample.

You could leave the SpamSieve app installed while uninstalling the plug-in. Then just reinstall the plug-in (and recreate the rule) later.

You can enter “Mail” in the search box in Activity Monitor. Then click the Mail icon in the Dock, click the Mail item at the top of the list in Activity Monitor, and choose Sample Process. That should still leave it at least 10 seconds to record the sample.

You could also start the sample from Terminal like this:

sample Mail -wait -file ~/Desktop/Sample.txt

and then launch Mail.

So, now this is pretty interesting… Yesterday, I clicked on a link in another post about Apple Mail being slow to open and you, Michael, explained to me that link was to set some preference NOT to ask Mail to count mailboxes. That, if you recall, caused me some new issue you said was causing me a “rule problem” and so you gave me another link that would turn the counting of mailboxes back ON. I clicked that link as well and it did fix that rule toggling (on, off, on, off) issue. That’s all I did, nothing more. Last evening I then logged off the computer as I do each evening. This morning, I logged on, opened mail and it now opens in one second, two tops… I guarantee it has NOT done that for the past couple of months or so as I had gotten used to clicking on Mail and then going to another screen to do something else to wait for mail to eventually load and tell me about new mail. But now, one second… or two… Pretty interesting… I still have the issue where SpamSieve is not quitting even though Mail is quit and I have checked more than once that the SpamSieve preference is set to shut SpamSieve when mail goes down. Small issue though. Just one I happened to notice while messing with other stuff.

So, I’m just reporting. At least for now, Mail is back and fast as ever… I’ve even logged off a couple times and came back on… Same… I’ve also manually quit Mail with SpamSieve still running… Restarted Mail. One second… And manually shut down both Mail and Spamsieve… Restarted Mail. Both launch with a second or two… Interesting…

That’s great to hear. Since you ended up not changing anything with SpamSieve, perhaps it wasn’t related to the slowness after all.

I mentioned what to do about that in the other thread.

There is also a FAQ entry about what to do If Apple Mail Is Running Slowly.

Periodically resetting (or uninstalling/re-installing) SpamSieve should not be necessary… but it is. After a month, it can take as long as a minute for Mail to launch when SpamSieve is installed. That’s definitely not good.

It may be related to the size of my SpamSieve records (I’ve been using the application since 2006), but developers should, by now, have engineered the application to access that data after Mail has launched. Right now, it seems as if Mail is calling SpamSieve as it launches, and that delays the load time.

Without SpamSieve, Mail is up and running in under five seconds. With SpamSieve reset or reinstalled, it launches in six or seven. Within a month, based on previous experience, Mail will take a minute to launch once again.

So… when will C-Command address this and rewrite SpamSieve to eliminate the drag? Even if it requires charging for an upgrade, a solution would be better than the reduction in productivity that SpamSieve not contributes to.

I agree. Fortunately, the vast majority of customers don’t seem to be seeing this issue. But, for some, Mail launches will eventually slow down and can be sped up again by unchecking and then checking the SpamSieve plug-in in Mail’s Manage plug-ins… sheet. It’s not necessary to uninstall or reinstall SpamSieve itself.

As far as I can tell, it has nothing to do with the size of the SpamSieve data. Mail does not call SpamSieve at launch, and the delay is not related to SpamSieve’s code. Mail itself gets stuck waiting on macOS before it has even loaded the SpamSieve plug-in.

Since the problem happens before SpamSieve’s code is loaded, and affects other plug-ins too, this does not seem to be something that we could address with a rewrite. I reported this bug to Apple a while ago, and hopefully they will be able to fix it.

Also, I want to emphasize again that it’s a good idea to measure what’s happening to make sure that what you’re seeing is the same issue.

OK. Well, before measuring this, I noted that Mail does take a long while to start (15+ seconds) with SpamSieve installed, similar to other reports. I did your step #2 in Manual Section 7.1.1.14 with good results. Getting the startup speed up to about 2 seconds.

That is on 10.15.5. Will measure it likewise on 10.15.6 now that it’s released. Will report any differences here.

If anyone is still seeing this problem on macOS 11, please record a sample log from Mail during the slow launch and send it to me so that I can update my bug report with Apple.