Monday, September 05, 2016

If Finder (Mac OS X) is sluggish, maybe it's that memory leak; here's how to fix it

Short version: if Finder is hogging RAM, killall Finder in a terminal window. It'll automagically restart and work much better.
The lovely Carol called me from her desk. "There are stories in this folder," she said, indicating the Finder window, "but they don't show up."

The Activity Monitor showed the finder as consuming something like 698MB of RAM. Firefox had something close to 2GB, so Finder wasn't the #1 hog, but still, over 600MB? After a few futile web searches, I came to this article on howtogeek.com, where I spotted:

Currently, the only way to quit the Finder is by typing “killall Finder” in a Terminal window, which is inconvenient.
Whoa! “You had me at ‘Terminal window’!” so I opened one and typed "ps x|grep Finder" followed by "killall Finder"; my plan was to restart Finder via snarf-n-barf of the full path ps(1) had showed me. But Finder restarted all by itself, performing quite snappily and using only a little RAM. Wow! That was easy!

Update: creating the "Quit Finder" menu item

Now, to make it easier for the lovely Carol to fix a sluggish finder herself, I decided to create a "Quit Finder" menu item. The method described in the above article or this one doesn't quite work—at least it didn't for me today:
defaults write com.apple.Finder QuitMenuItem -bool YES
This following works fine, though; it's the same thing except with a lowercase "f" in "finder":
defaults write com.apple.finder QuitMenuItem -bool YES
It's shown in these postings:

No comments: