10.4: Speed up Spotlight searches via paste

Jun 08, '05 09:09:00AM

Contributed by: Anonymous

Tiger only hintYou can dramatically speed up searched via Find or Spotlight by simply pasting the search into the field -- in this way, only the full text string is searched, not each individual letter as it's typed.

You can just select the text you wish to search on, if it exists, and copy/paste as needed. Or, here's a convenient AppleScript that accepts text and copies it to the clipboard:

with timeout of 30 seconds
  try
    set r to display dialog ¬
     "Enter search:" default answer "" buttons ¬
     {"Cancel", "OK"} default button ¬
     "OK" cancel button ¬
     "Cancel" with title "Clipboard Filler"
    if button returned of r = "OK" then
      set the clipboard to text returned of r
    end if
  end try
end timeout
Store the script somewhere easily accessible, like the Finder's Sidebar or Toolbar, and then just run it when you need to generate some clipboard text.

[robg adds: I tested this, and there's definitely a notable difference in search speed. Pasted text only runs the search for the whole string; when you type searches, you have to wait while Spotlight finds all files that match the letters you're typing.]

Comments (15)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20050523131630541