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


Click here to return to the '10.4: Improve Spotlight's search speed' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Improve Spotlight's search speed
Authored by: adams4 on May 11, '05 10:36:16AM

This is a reply, actually, to Rob's comment that, "It's astonishingly slow at what seems like simple stuff." I would think that the searches that Spotlight does are not simple at all, even though the interface we use makes it seem that way.

There's two things going on (that I can tell, given my experience with databases and indexing). The first is that the operating system itself (i.e., the executables responsible for doing the Spotlight searching and displaying those results) has to balance out when it searches and when it displays. For example, if I searched for the word wyoming (hail to thee, Phil Schiller!), if I'm a slow typist, the system might start searching on "wyo" then "wyomi" then "wyoming," paring down the search results as I type. That's a penalty we exact for doing an interactive search. If the system were designed to either have a longer delay before a search started (so you can finish typing) or if you had to always hit Return after a search, then the search itself would appear faster, since the system doesn't have to eliminate results as it displayed them if you keep typing. The rotten thing is most people would probably balk at such a thing as hitting an extra key, when they want to start seeing search results without any other steps.

The other reason searches bog down is because the system is always (and only) doing a keyword search. Using the example (looking for all things "wyoming"), the system has to pull up the most relavent results for that keyword in all the file types it handles, which might mean looking at up to 14 different kinds of files (and therefore, 14 indexes). If there's just a single index, that makes it worse, since the OS must then go back and forth in that single file to obtain the results. In contrast, a much more rapid search is a browse search, where your search "lands" on a term in a specific index (or indexes, if so desired). But, of course, this would detract from the simplicity of doing a keyword search.

Take a look at any library system's online public access catalog (OPAC) to get a better idea of what I mean.

---
Adam Spector.

[ Reply to This | # ]