C-Command Software Forum

10.5.7 Mail painfully slow - need help to diagnose issue ?

Thanks for a great SPAM filtering solution. It has worked flawlessly. I suspect my issue has nothing to do with SPAMSIEVE but rather with Mail or AppleScript. However, I do need some help in trying to track down the issue. My apologies for the long post.

I have noticed over the past few months that Mail seems to be getting slow. This probably started around 10.5.5. Note, my primary symptom was that the SPAMSIEVE audible alert would sound a long time before a message would display in the inbox of the Mail application. Initially, I thought these were errant alerts, although eventually I figured out that it was just taking a long time. I also made sounds which were unique to SPAMSIEVE so I am convinced that SPAMSIEVE is actually generating the alert.

I upgraded to 10.5.7 yesterday and Mail became even slower. It appears that the upgrade has resulted in Mail wanting to walk my IMAP email servers folder hierarchy and the Mail Activity window is usually displaying “Updating cache directory” for a number of folders. I am concerned about this because one of my IMAP accounts has 5.9GB of mail. I generally never delete messages. Also, I have tended to move away from filing other than into an Archive folder by year. However, I still have a 200 or more folders back from the days when I used to file mail. In any event, yesterday after the upgrade and reboot, everything appeared to be working but was even slower.

This morning when I started up Mail no spam was filtered. I noticed that SPAMSIEVE was not running. I then tried to start SPAMSIEVE manually and it would not start. At least not while Mail was running. Actually, it would appear to start but immediately vaporize. That is no trace in Activity Monitor. I then came to the forums to see if there was any information about problems with 10.5.7. There I noticed that the current version of Spamsieve was 2.7.4. I checked my version via get info in finder and discovered I had 2.7.3. I then realized that somehow the check for updates feature in Spamsieve had been disabled. After dowloading 2.7.4, I once again have spam filtering. However, my slowness problem continues.

It’s now taking two minutes or longer after Spamsieve’s audible alert for the message to display in my Inbox. Also, I have noticed that the Rules which follow the SPAMSIEVE rule, primary for setting colors of messages based on sender, are not being executed most of the time. I suspect the lag in time is more of a Mail or Apple Script problem. However, I have no idea as to how to track this down. I have confirmed that there are no erroneous “stop evaluating rules” actions in any of my rules.

I also just realized that somewhere along the line that Spamsieve’s spam coloring had stopped working as well. As soon as I upgraded to 2.7.4 I started seeing spam messages which had their background color set.

Mac cpu performance should not be a problem. I have an 8 core Mac Pro with 8GB of memory and Mail is very rarely seen as using more than 10-12% of the CPU.

Any suggestions as to how to track this down? I did speak to AppleCare at one point, probably back when I upgraded to 10.5.6. However they were not of much help other than to suggest reinstalling Mail.

To find out what Mail is doing while it’s being slow, you can take a sample. Open the Activity Monitor program and select Mail in the list. Then choose Sample Process from the View menu.

In this case, my guess is that it’s a combination of having too much mail in it (which is why I wrote EagleFiler) and having a mail database that needs to be optimized. How large is the file:

/Users/<username>/Library/Mail/Envelope Index


In terms of the size, it was 37MB prior to my running “sqlite3 ~/Library/Mail/Envelope\ Index vacuum;” which reduced it to 35M, although I now see that it is at 44M.

For the time being, I’ve stopped using the offending email account, that is taken it offline, and using my backup email account which gets copies of all my current messages.

In doing that I believe I’ve proved that it is not a Spamsieve issue since when accessing the other IMAP account which has nothing locally, the notification from Spamsieve and the message appearing in the Inbox are almost simultaneous.

I suspect the issue is that when I upgraded to 10.5.7, something with Mail was reset or deleted. Although, this would not explain, the delays I’ve experienced over the past few months. I’ll try to chase AppleCare and see if they can find anything with a sample file from Mail. That is if they will even look at it.

Thanks, I’ll report back at a later date.

37 MB is very small for 5.9 GB of mail. I guess you must have lots of attachments taking up the space, rather than lots of messages. Mail should certainly be able to perform well at that size.