Calculate Sizes CPU usage bug in Leopard’s Finder
Lately I’ve noticed the Finder on my MacBook Pro has been running both CPU cores at 40-80% for no apparent reason. From what I’ve been able to tell, there is a bug related to having the same window open in two different spaces with Calculate Folder Sizes enabled. I filed a bug on this (5609348) but Apple is already aware of this issue.
Workaround: Closing all the Finder windows (⌘-w) seems to bring the Finder’s CPU usage back to zero.
The following steps will recreate the problem every time for me:
- Log in to the guest account
- ⌘-up arrow twice (navigate up from guest user’s home folder)
- ⌘-2 (list view)
- Open System Prefs
- Enable Spaces with default options.
- Open Activity Monitor (via Spotlight), search for “Finder” to clean up display
- Arrange windows so the CPU value is visible behind the window
- Switch to another space
- Create a new window: ⌘-n, ⌘-up arrow twice, ⌘-2
- Switch back to first space
- Click Finder window to be sure it’s selected (probably unnecessary)
- ⌘-J (Show View Options)
- Check “Calculate all sizes”
CPU usage should now increase. On my MBP I see about 40% across both cores.
- Uncheck “Calculate all sizes”
CPU usage increases to as much as 80%
A few notes:
The window should have a lot of files underneath it. If the Calculate all sizes command finishes too quickly it won’t show the problem. I opened windows to the top level of the hard drive because there weren’t enough files in the default guest account home folder.
This behavior did not happen with both windows in the same space.