This is more of a high level "how do you solve this type of problem" type of question, as opposed to a "why doesn't my code compile" question.
I've got a search bar within an iPhone application that searches my data just fine. However, i have the search triggered (handleSearchForTerm is called) after each keypress. This creates some lag.
I like the idea of having search results appear automatically, but I don't like that for larger datasets, the act of searching appears to interrupt user input.
Is this something I can't fix aside from making my search routine faster? Or, is there a better way to handle this?
One thought is that I'd like to be able to trigger a search only, say, 500ms after a keypress (unless there has been another keypress in the meantime, then reset). Is that possible?
Thanks for any help.