Like many other users, I've had problems with the spinning ball in Safari. Activity monitor showed it was eating up 80% of my CPU.
When I first noticed it, I'd sometimes have to wait 10 seconds for the spinning ball to go away. And with each passing day, it seemed to take longer -- eventually it got up to 30 seconds. What was worse, while the problem had originally only affected my home Mac, it soon started happening on my Mac at work, too. And then a coworker's Mac as well.
I *finally* tracked down the problem. Deleting this file fixed it: ~/Library/Safari/Form Values
You can also delete this file like this: Safari -> Preferences -> Autofill -> Other forms -> Edit -> Remove All
What caused it? I recently started playing a game called Sudoku at this website:
http://www.websudoku.com/
Every game counted as a unique form, and Safari was storing all the values for every game. Deleting the stored form values fixed the problem on all three computers.