Dock on Lion using lots of cpu and RAM

Solution 1:

You could try removing all of the icons from your dock that you can and then slowly add them back until you find the app that is causing the memory leak.

Solution 2:

Some apps that 'update' their dock icons with information (e.g. Mail, App Store, myriad third-party apps that might 'monitor' things such as temperature, processes, network connections) can definitely cause big resource draws. I've had the whole machine move in slow motion because of this.

As a result, I generally turn off any dock icon updating, or as Apple calls them, 'badges', both from Apple and third parties, regardless of nature/flavour/complexity. I much prefer my information to reside in the menu bar anyway (where possible), and it generally doesn't eat up so many resources. This way I avoid the behavior in question, that I have only ever had intermittently, not constantly like you did (obviously this is not guaranteed to be what was causing your troubles).

You could also try deleting the dock cache file* (at least in Lion/10.7): com.apple.dock.iconcache inside…

/private/var/folders/**twodigitfoldername**/**crazystringalph+nums**/C/

Some people just go into Terminal and type:

sudo find /private/var/folders/ -name com.apple.dock.iconcache

…however, this shows you all users' dock icon cache file. That's why I prefer to move through the GUI filesystem, because the other users' folders will be unreadable, so you can just find this through browsing/elimination. It's the only one you can actually read.

To get started

  1. Make sure Finder is the front-most application
  2. Press ⌘ cmd + ⇧ shift + G
  3. Paste/type in /private/var/folders/ and click Go.

*Note: when you update the Finder dock icon this is one of the steps included in the process for Lion.