Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.4: Speed up Spotlight searches via paste System 10.4
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
    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.]
  • Currently 2.50 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)

10.4: Speed up Spotlight searches via paste | 15 comments | Create New Account
Click here to return to the '10.4: Speed up Spotlight searches via paste' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Try my Laserlight
Authored by: sjonke on Jun 08, '05 10:06:19AM
I created a utility I call Laserlight that does it all for you. Enter your query and press return. The query gets put into Spotlight in one fell swoop. You have the option to do a name/keyword only search too and you can customize the script to default to that if you wish, as well as optionally default to the full spotlight window. Currently these default settings are only available by editing properties at the top of the script, but I've tried to make this as easy as possible.

--- What?

[ Reply to This | # ]

10.4: Speed up Spotlight searches via paste
Authored by: on Jun 08, '05 11:29:25AM

There should be some plist setting specifying the delay before the actual search is run. Anyone?

[ Reply to This | # ]
Use Quicksilver
Authored by: SeattleSeth on Jun 08, '05 12:35:17PM

yet another option is to use Quicksilver B42 with the spotlight plugin installed to do this.

1) Launch quicksilver
2) enter text mode ('.' key)
3) type in string to search
4) hit tab key to go to next field
5) Select Search using Spotlight

This is very fast and lets me use Quicksilver, which I am already familiar with.

[ Reply to This | # ]
Use Quicksilver
Authored by: MtnBiker on Jun 08, '05 02:07:53PM

Can Quicksilver be set up to only search for file names and not contents?

BTW, I had to set QS to be in beta mode for the Spotlight module to load.

Hermosa Beach, CA USA

[ Reply to This | # ]
10.4: Speed up Spotlight searches via paste
Authored by: tifighter on Jun 08, '05 03:37:51PM

This functionality is built-in to Tiger as well. Just highlight the word or phrase and command-click on it. In the contectual menu there is 'Search in Spotlight.' This is along with 'Search in Google' and 'Lookup in Dictionary.'

[ Reply to This | # ]
"command-shift-F" for a selection
Authored by: Hal Itosis on Jun 10, '05 05:03:59PM
The 'control' key is probably what you meant, for getting a contextual menu.

However -- if a word selection is what we want to search on -- even easier is
to type command-shift-F. (This shortcut can be seen in the Services sub-menu).


[ Reply to This | # ]
10.4: Speed up Spotlight searches via paste
Authored by: thebimbo on Jun 08, '05 05:08:14PM

Yep this 'feature' bugs me although it works fine in iTunes.

Apple PLEASE build a slight delay (add say a preference for this) to allow us to type in a few characters before Spotlight starts its search!


[ Reply to This | # ]
10.4: Speed up Spotlight searches via paste
Authored by: nickp on Jun 08, '05 11:02:57PM

Um, this is simply cruddy programming on the part of someone at Apple. *Any* event loop based program should treat user input as the absolutely most important thing, and stop whatever else it is doing in order to process that input. And then throw away what it _had_ been doing if that's appropriate.

If doing the character-by-character search is slower, then throw it away and start a new search whenever the user types a new character.

I am amazed at the number of programmers that get this wrong; frankly I think it is inexcusable. Open a &$%! textbook.

A delay? Bandaid solution. Which also breaks the "incremental search" (as we used to call it back in the Triassic) feature for those that like it.

More evidence for Rob's theory that Spotlight is really a version 0.95 product ...

[ Reply to This | # ]
10.4: Speed up Spotlight searches via paste
Authored by: David Grossman on Jun 09, '05 12:28:53PM

Spotlight is annoyingly slow, to the point where I don't want to use it. I type one letter and get the spinning beach ball for 30 seconds! Totally unacceptable. You'd think someone at Apple would have realized that most people don't want to do a system wide search for the letter Q! Like a previous poster mentioned, all they had to do is have a one second delay to wait until the user stops typing. I hope this will be fixed in the next update. This is a major problem for the #1 feature of the new OS.

[ Reply to This | # ]
10.4: Speed up Spotlight searches via paste
Authored by: sjonke on Jun 09, '05 04:25:14PM

Even on my lowly iMac G3 400 MHz, the delays associated with spotlight are no where even in the remote vicinity of 30 seconds. It stutters a bit, but I don't get a spinning beach ball at all. Either you are running OS X somehow on a 68040 mac :) or I think something is seriously fouled up and it's probably Spotlight's index. You might try dragging your hard drive into Spotlight's Privacy settings - that will delete the index for it. Wait a few seconds to make sure it finishes removing it. Then remove your hard drive from the Privacy list, and then wait quite a while for the index to be rebuilt. I suspect that will solve that problem. Note that Spotlight will be painfully slow if you try to use it while this complete re-indexing is going on, so wait for it to finish.

--- What?

[ Reply to This | # ]
10.4: Speed up Spotlight searches via paste
Authored by: tvalleau on Jun 18, '05 01:05:20PM

Or (as the original poster of this tip) it may be that some of us (like me) have 135 Gigabytes of data, spread across just under 1,000,000 files...

It's how much data you are trying to ask spotlight to access that is causing the slow-down.

[ Reply to This | # ]
10.4: Speed up Spotlight searches via paste
Authored by: weatherh on Jun 11, '05 02:17:10PM

as posted earlier, Quciksilver fixes the whole problem. If you adjust a few QS settings, then you get a process like this:
hit ctrl-space-space
type the word you want to search for
hit return
Spotlight search is DONE!

[ Reply to This | # ]
10.4: Speed up Spotlight searches via paste
Authored by: szabesz on Jun 16, '05 06:29:54PM

And the same goes for Preview as well. I hate to search in PDFs width Preview. I often get the spinning beach ball of death for more than 30 seconds. This "feature" is ridiculous! It is a bug, not a feature.

[ Reply to This | # ]
10.4: Speed up Spotlight searches via paste
Authored by: dave1212 on Jul 05, '05 02:12:16AM

I like Butler's solution; to give the option to disallow one-character searches.


[ Reply to This | # ]
10.4: Speed up Spotlight searches via paste
Authored by: matthewpack on Apr 02, '06 06:40:28AM

if you have launchbar 4 installed check out these instructions - no need to mess around with apple scripts and one letter searches

Triggering Spotlight Searches from LaunchBar
A new Search in Spotlight command passes search requests to the Spotlight window.
Can by invoked by typing Command-F in LaunchBar or with a dedicated, system wide keyboard shortcut that can be configured in the Keyboard Shortcuts pane of LaunchBar preferences (default is Command-Option-Control-Space). Note: It's planned to make this shortcut more customizable in a future version.
Smart preprocessing: No need to type clumsy search strings like "date:today kind:todo". Just type "today todo", "folder backup", "url apple", or "pref tcp" and LaunchBar automatically transforms these search requests into the correct Spotlight syntax.
To search literally instead, just put the search string in quotes.
Recognizes alternative kind specifiers such as picture, url, ical, ... instead of image, bookmark, event, ... so entering "picture flower" or "ical today" will deliver proper search results.

[ Reply to This | # ]