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):
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
- Make sure Finder is the front-most application
- Press ⌘ cmd + ⇧ shift + G
- 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.