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:

  1. Log in to the guest account
  2. ⌘-up arrow twice (navigate up from guest user’s home folder)
  3. ⌘-2 (list view)
  1. Open System Prefs
  2. Enable Spaces with default options.
  1. Open Activity Monitor (via Spotlight), search for “Finder” to clean up display
  2. Arrange windows so the CPU value is visible behind the window
  1. Switch to another space
  2. Create a new window: ⌘-n, ⌘-up arrow twice, ⌘-2
  1. Switch back to first space
  2. Click Finder window to be sure it’s selected (probably unnecessary)
  3. ⌘-J (Show View Options)
  4. Check “Calculate all sizes”

CPU usage should now increase. On my MBP I see about 40% across both cores.

  1. 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.