Macworld Forums

Macworld Forums: Mac OS X Hints Weblog: A possible fix for a slow Mail app - Macworld Forums

Jump to content

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Mac OS X Hints Weblog: A possible fix for a slow Mail app

#1 User is offline   Macworld.com 

  • Veteran
  • PipPipPip
  • Group: Members
  • Posts: 1,900
  • Joined: 06-February 04

Posted 08 March 2007 - 10:20 AM

Do you feel Mail.app has slowed down? Or do you see odd message counts in certain mailboxes? An industrial strength index rebuild might solve your issues. [more]
0

#2 User is offline   tomburton56 

  • Member
  • PipPip
  • Group: Members
  • Posts: 25
  • Joined: 11-May 06

Posted 08 March 2007 - 04:05 PM

Hey, thanks for the terminal solution. It beats the bruit-force solution, which I applied a few times to various machines, sometimes to improve speed, sometimes because I needed to recover from a pilot error ChronoSyncing mail between machines, and once in a vain attempt to remove ghost messages.
Those ghosts are still with me after two years, part of the fire-wire brain transplant from my G3 laptop to my MacBookPro. I tried all but the kookiest notions on Apple's Support discussion board. Then I called Apple Support, who recommended a clean-slate re-install. No, thanks, I'll tolerate a few ghosts.
Cleaning up the envelop index confined the ghosts to a single mail account. I'll be deleting that account in about five months. I hope the ghosts will go with it.
0

#3 User is offline   Davidb 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 5
  • Joined: 25-August 06

Posted 08 March 2007 - 04:29 PM

Can you comment on the usefulness of this tip in a situation where Mail is running an Exchange account?
0

#4 User is offline   elo1 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 8
  • Joined: 27-September 05

Posted 08 March 2007 - 04:36 PM

Awesome tip! Thanks. This definitely improved my Mail experience.
0

#5 User is offline   whostolemyname 

  • Member
  • PipPip
  • Group: Members
  • Posts: 63
  • Joined: 07-July 05

Posted 08 March 2007 - 04:56 PM

I'm curious about having done something similar. I had some problems with Mail and Tech Support had me move the database to the desktop and re-import the file. I ended up with some older messages blank with the message that they were no longer on the server. I believe they were POP messages, not IMAP.
I just switched to Mail to check and could not find the problem aynore, although visiting many of my 161 mailboxes/folders caused a problem as they stopped displaying any messages at all after a while. I restarted Mail and all was okay.
I am wondering if 161 mailboxes/folders and perhap 20,000 messages is straining the database. btw-- I need to keep emails with clients going back to year 2000 and need them quickly accessible, hence the large number.
0

#6 User is online   kelake 

  • Member
  • PipPip
  • Group: Members
  • Posts: 133
  • Joined: 09-September 05

Posted 08 March 2007 - 06:16 PM

This stopped my migration from mail.app to Gmail. Searching within Mail had been completely unusable and far slower than what could be experienced with Gmail. Not so after running this routine. Search and folder switching is almost instantaneous.
I now also perform this regularly via applescript and iCal.
0

#7 User is offline   snej 

  • Member
  • PipPip
  • Group: Members
  • Posts: 72
  • Joined: 03-February 05

Posted 08 March 2007 - 08:34 PM

This is like a game of Telephone ... each time the information propagates, it loses a bit of accuracy. In particular, I think Rob is confusing vacuuming with throwing out the entire database (or using the Rebuild command).
1. The "Envelope Index" file isn't just the sqlite database's index: it's the entire database.
2. The word "index" at the end of the command you type in Terminal is unnecessary. sqlite3 ignores parameters to the 'vacuum' command. (http://www.sqlite.org/langvacuum.html)

3. All this does is make the database file smaller. That's it. It doesn't change the information in the database in any way. You'll get faster performance due to less I/O as Mail reads the database, because the records are closer together; but this
can't possibly fix problems like "ghost messages". If you have such problems, the Rebuild Mailbox command, or throwing out the entire Envelope Index file, may be called for.

4. Likewise, doing this will
not_ cause Mail to lose or re-download attachments. Again, rebuilding the mailbox or deleting the database would cause this to happen, but mere vacuuming won't.
And in response to a question above, this can help with any type of Mail account, since all messages are stored in the database, no matter what type of account they're from.
0

#8 User is offline   griffman 

  • old friend
  • Group: Macworld Insiders
  • Posts: 8,788
  • Joined: 09-January 01

Posted 08 March 2007 - 09:23 PM

Thanks for the clarificatons, but I have to disagree with one point: there are multiples of users who ahve reported lost mail after redoing their indexes. You can read some of the comments on the original macosxhints entry if you want.
I haven't spoken to them directly, but I somehow suspect IMAP is involved, and their is then some sort of failure to re-read the file from the server. But there are enough comments that I think the problem is legit.
As for the index bit at the end of the Terminal command, I just used what was posted at Hawk Wings, so it's quite possibly redundant /forums/ubbthreads/images/graemlins/smile.gif
-rob.
0

#9 User is offline   ajhoughton 

  • Member
  • PipPip
  • Group: Members
  • Posts: 79
  • Joined: 13-April 06

Posted 09 March 2007 - 07:50 AM

Quote:

Thanks for the clarificatons, but I have to disagree with one point: there are multiples of users who ahve reported lost mail after redoing their indexes. You can read some of the comments on the original macosxhints entry if you want.


This could easily happen if the database file itself was corrupted somehow, as the vacuum command works by building a new copy of the database from the data currently in it. If the index structure was damaged, or if there are bad blocks in the database, it's quite likely that you'd lose information. That said, those reporting a problem may already have lost messages (but not noticed), and only spotted the problem after using this tip.
Anyway, this is a great tip; it's made my copy of Mail go much faster.
0

#10 User is offline   Formac 

  • Member
  • PipPip
  • Group: Members
  • Posts: 22
  • Joined: 05-May 03

Posted 09 March 2007 - 09:52 PM

By now, this is repeating an earlier comment; but, based on Hawk Wing's comments (imptetus for this article), this is a significant oversite since with "vacuum" index and table name argument is now ignored. Updated command:
sqlite3 ~/Library/Mail/Envelope Index vacuum;
0

#11 User is offline   Popelka 

  • Member
  • PipPip
  • Group: Members
  • Posts: 16
  • Joined: 12-July 07

Posted 12 July 2007 - 12:58 AM

My Mac Mail was getting very slow, especially when downloading messages from an Exchange server. I tried all of the suggestions in this forum but nothing changed. Independently, I also noticed that my battery life on my laptop was only about half what I have been getting - 1.5 hours vs 3 hours. I looked at the Activity monitor and a process called "python" was occupying 48% of the CPU which also caused a kernel task to be occupying 46% of the CPU!!! This process was associated with Mail but when I looked on line I could find nothing. I stopped the "python" process which in turn stopped the kernel task and Mail is now the fastest it has ever been, even though it has several accounts and 10s of thousands of messages - works essentially instantly now.
What is "python" and why was it running?
0

#12 User is offline   d00d 

  • Advanced Member
  • Group: Macworld Insiders
  • Posts: 12,593
  • Joined: 24-April 01

Posted 12 July 2007 - 09:05 AM

Are you using any third party plugins with Mail.app?
Python is a programming language with its own interpreter. If the python process was really associated with Mail.app, I suspect it's coming out of a plugin.
0

#13 User is offline   DanEsq 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 0
  • Joined: 03-November 07

Posted 11 July 2009 - 09:37 AM

July 11, 2009 - I used the "Terminal Solution" described in the body of Rob Griffiths' article, BUT used the "sqlite3 ~/Library/Mail/Envelope Index vacuum" command line described in FORMAC's comment dated Mar 9, 2007, all as set out above. TOTALLY WORKED for me on my MB (not Pro) running OS 10.5.7 and Mail 3.6. Two thumbs up! Dan R
0

#14 User is offline   Philsvbz 

  • Newbie
  • Pip
  • Group: New Members
  • Posts: 7
  • Joined: 25-July 11

Posted 27 July 2011 - 08:29 AM

I did the vacuum index command in terminal, and mail did speed up, but, oddly, other apps seem to have slowed down. It's typical for me to work in mail, quit mail, open, say, firefox, then have to force quit firefox due to the spinning ball. Is it possible the vacuum index command could have affected other apps negatively?
0

Share this topic:


  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

2 User(s) are reading this topic
0 members, 2 guests, 0 anonymous users