Mavericks Finder spins when opening folders

Since upgrading to Mavericks, Finder sometimes hangs when I select a folder and am waiting for its contents to populate the window. This happens primarily in Open dialog boxes:

Finder spinning

It'll spin for about 15-30 seconds before showing the items in that folder. I can "Go to folder" and it'll usually show the contents immediately in that case. Why does it spin, and is there a way to make it faster? (It should be instant. I don't go to folders with thousands or even hundreds of items.)

Clarifications: These are just regular, local folders, usually in my home directory... not Remote Disc or network shares or anything fancy. It's an early 2013 Retina MBP, so it has a solid-state drive.


There are a number of Apple Support Communities discussions regarding this, and a number of possible fixes given. To summarise in case one works for you:

  • Disable Finder App Nap

    This seems to fix it for almost everyone on ASC who had Finder working fine in 10.8 but now is 'broken' in 10.9.

    sudo defaults write com.apple.Finder NSAppSleepDisabled -bool YES
    

    …then log out and back in with 'Reopen windows when logging back in' disabled.

  • Clear Finder Caches

    Empty ~/Library/Caches/com.apple.finder and restart Finder.

    rm -r ~/Library/Caches/com.apple.finder/ && killall -HUP Finder
    
  • Reset Finder Preferences

    Related to above — delete both preference files used by Finder:

    rm ~/Library/Preferences/com.apple.finder.plist ~/Library/Preferences/com.apple/sidebarlists.plist
    
  • Reindex Spotlight

    sudo mdutil -E /
    
  • Change the 'Show Scroll Bars' setting

    It seems that it can be fixed by changing the scroll bar setting in System Preferences → General from When Scrolling to Always.

  • Repair Permissions

    Try repairing permissions in Disk Utility.


I don't understand all the specific technical details, but this is apparently caused by ISPs that perform NXDOMAIN interception. Following that forum post, try running this in Terminal:

ping Backups.backupdb

If you don't get the following response:

ping: cannot resolve Backups.backupdb: Unknown host

...then your ISP is performing NXDOMAIN interception, which is causing the delay.

The procedure to disable the interception depends on your particular ISP. For instance, if you're using OpenDNS (which does interception by default), you can disable it in your account settings.


I was having this exact same problem on my machine, and I was using OpenDNS (but without an account, so I couldn't change the setting). I simply switched back to my ISP's (AT&T) default DNS – which apparently doesn't do interception, since I got the "correct" ping response above – and the problem immediately went away.

(I take no credit personally for this solution; I'm merely reporting it here for everyone else's benefit. It seems to be a very common issue with Mavericks).