Saturday, 7 June 2014

Fix for 100% CPU use in Apple Mail - Mavericks 10.9.3

Migrated to 10.9.3 today. Fired up Mail. 100% CPU, loud fan, hot laptop, slow system... Happens every time.  Happily there's a quick and trivial fix.

Issue is clearly widespread, as reports are all over the web.  Shows dreadful lack of QA on Apple's part. 10.9 is no longer new (it's about to be superseded by 10.10) so it's pretty poor that Apple still hasn't fixed it yet.

Workaround was quick and very simple...  And clearly points to what Apple needs to fix in their code.

From 9to5mac :
  • Close Apple Mail.
  • Enter your Gmail Account using a Web Browser.
  • Check your Mailbox Labels for ‘/’ entries (e.g. [Imap]/Drafts .
  • Edit any ‘/’ Label you find. Remove the ‘/’ from the Label -> [Imap] Drafts.
  • Save your modfied label name(s).
  • Now launch Apple Mail.
This works.  So problem solved for me.  But, Apple really needs to fix their code to cope with a "/" in an IMAP folder name without going into a tight loop.

I've logged a bug report on Apple's bug reporter system.  I'll be interested to see what comes of it.

UPDATE: Apple marked my bug report as a duplicate. It seems strange that they haven't prioritized fixing this bug, as it seems likely to impact a lot of users.

UPDATE: Screen shot added for Alberello.  What I mean was: log into your email account at https://mail.google.com and then look at the folder names (see screen shot).  Note that you may need to click the link at the bottom ("More") to see all the folder names.  In my case, the [Imap]/Drafts folder seems to have come back (maybe because one of my mail clients remembered it?) but it doesn't seem to cause the 100% CPU issue on Mac OS X 10.10.1 (Yosemite). 


 

28 comments:

  1. Thanks. That solved my problem.

    ReplyDelete
  2. You're a legend. This worked wonders...

    ReplyDelete
  3. Please can you specify what do you mean with "Check your Mailbox Labels for ‘/’ entries (e.g. [Imap]/Drafts" ???

    ReplyDelete
  4. I have deleted Gmail account from my MacBook Pro and this can't solve the problem... :(

    ReplyDelete
  5. Hi Alberello. I have just added a screen shot to the article. Hope this helps.

    ReplyDelete
  6. So Alberello... You are still seeing 100% CPU use in the Mail application without any GMail accounts configured? Weird! Perhaps worth updating to Yosemite, as it's a free update anyway.

    Only issues I'm seeing with Yosemite are related to the Mac OS X firewall needing to be turned off for access to file shares on my Time Capsule device.

    ReplyDelete
  7. I am already in Yosemite. My MacBook already have it installed. I am not using firewall.

    ReplyDelete
  8. Thank you a lot Martin. I was so afraid that my new Macbook pro 15" started doing this loud noise from the fan and I didn't know the reason... First I check the CPU activity monitor and saw it was the Mail app. Then a friend found your glorious post, you are the boss! ; )

    ReplyDelete
  9. Hi, as a follow up, this worked for me, but now I can't archive in Mail as it no longer finds the renamed [Imap]/Archive > [Imap] Archive. the Mailbox/Use this Mailbox for… menu option won't allow me to set it for Archive. Any ideas how to get it working again? Many thanks.

    ReplyDelete
    Replies
    1. Hi Simon.

      I haven't seen the effect you mention, but then I don't really use the Archive button on my GMail account - because GMail automatically keeps an archive copy in the "All Mail" folder. Deleting a message from Inbox doesn't delete it from All Mail.

      Out of interest, what version of Mac OS are you running? Did you have all updates applied, and did you see the 100% CPU issue? (loud fan, sluggish performance)

      Delete
    2. Hi Martin, Yes, I had the CPU at 100+% issue and fixed it as above, Using Mail 5.3 on OS 10.7.5 on a MAcBook Air, 3+ years old. All updates applied.

      Understood on All Mail, though I use Gmail filters/labels to act as folders in Mail. Setting mails to go to the appropriate label/folder in Gmail, when finished with an email in MAil, I simply hit archive and away it goes, or rather went until I renamed [Imap]/Archive to [Imap] Archive.

      I used Mailbox/Use the mail box for… to reassign the renamed [Imap]/Drafts to [Imap] Drafts, but a 'Use the mail box for/Archive' option isn't available.

      Any help gratefully received. Thanks.

      Delete
    3. Hi Simon. Can't help personally... But I've just logged back into http://bugreporter.apple.com and updated my ticket from 6 months ago, to point out that the bug is still happening on fully-updated Mavericks and Yosemite systems, and really ought to get priority treatment

      Delete
  10. Hi Martin, Thanks,and Happy New Year, Simon

    ReplyDelete
  11. I don;t know who you are, but this solved a very longstanding problem that was driving me CRAZY. Many thanks!!

    ReplyDelete
  12. You're welcome. Out of interest, what operating system were you running? And were all Apple updates applied?

    ReplyDelete
  13. Did not work for me, and tested with two different GMail accounts:
    1st account: with a lot of email, folders and subfolders, but I don't have any of them with the "/" in the name...
    2nd account: less mail and few folders (without any subfolder), again no-one with the "/" in the name...

    Activating the 1st the CPU goes up... I waited until it finish to download the messages but the CPU still around 40%... then my suspect was moved on the subfolder, because the labels name are "mainFolder/subFolder", so I started the second test with other account...

    Deactivating the fist and activating the second one I waited again the sync and again the CPU has an high value (~40% again)... so the "/" is not the guilt of the mail issue on Mac OS X!

    Last, I have done all the tests on Mac OS X "El Capitan" 10.11.1

    ReplyDelete
  14. Can't believe it was this simple. Thanks so much. (this problem still applies to today it seems, running latest mac OS + updates)

    ReplyDelete
  15. shoot - How do you all use Mail? I had such high hopes for this, but removing the '/' breaks the subfolder dropdowns that makes mail a lot easier to use. Now each of my accounts has to be viewed below the 'Inbox' in it's own area, and each folder is separated like INBOX-X, INBOX-Y instead of one INBOX for all accounts with subfolders under INBOX, account -> X and Y.

    ReplyDelete
  16. how can i rename the label inside google webmail.. should i recreate the rules and save them without / .. or is there a way to rename it? couldnt fint it. osx sierra, mail cpu 100%. :/

    ReplyDelete
  17. If you are logged into http://gmail.com from a computer (not a smartphone) you should be able rename any folder names that contain a "/" character. Hover over the folder name, then click the little arrow that appears - and pick "edit".

    Not sure what you mean about rules. If you have some rules set up, I'd hope they would be updated automatically if you rename any relevant folders - but worth checking.

    ReplyDelete
  18. But I tried this and it removed all mailboxes from Mail.app and did not put them back until I replaced the "/" in Gmail?

    ReplyDelete
    Replies
    1. Maybe try deleting the account from Mail.app; then removing the "/" in GMail; then adding the account back to Mail.app.

      If that doesn't work, then I would seriously suggest switching to the Thunderbird mail client.

      Maybe if someone with a MacBook demonstrated this bug to a guru in an Apple store, they could get the bug bumped up in priority on Apple's RADAR tracker so that it actually gets fixed? Hard to believe that this 100% CPU usage bug in a core application has been left unfixed for over 2 years.

      Delete
  19. I changed it, gotta see if it works but they really need their head against a wall a few times if THAT IS ALL TO IT.
    Sucks energy all over the world...

    ReplyDelete
  20. Can you please add the bug ID and so we can bump this one and the one it was a duplicate of?

    ReplyDelete
    Replies
    1. From my email archive, I can see that my bug report ID was 17215146, submitted on 7.6.14.

      I was informed just a few days later, on 12.6.14, that it was a duplicate of bug 16173575.

      However, the Apple bugreporter database isn't publicly viewable, so I was unable to view the original bug.

      I can't view my own bug report now, even though I can still view the other 9 of 10 bugs that I've reported over the years.

      On the whole, my experience has been that Apple's response to bug submissions has been good. So it's strange the this one has been left unfixed for over 2 years, when (judging from comments on this blog page) it affects a large number of users, due to the popularity of GMail.

      Delete
  21. Thanks for this solution. I made the change and the fan noise disappeared and the Mail performance has improved dramatically.

    ReplyDelete

Spammers: please stop wasting my time. All comments are moderated before publication.