On Mon, May 17, 2010 at 3:23 PM, Bill McCarthy <[email protected]> wrote:
> Yep. Make sure you are checking the new search string starts with the old
> search string. If it doesn't then filter from the original data, otherwise
> filter from the last filter.  And create new lists, not remove from old
> ones; removal is slow and costly with array backed lists.
> The trick is to use originally sorted lists, cached, and to also cache the
> last filter.. don't use compound queries.
>
> Oh and also don't use data structures like a Trie: that'd be a complete
> waste of time if you are doing a substring search as you'd still have to
> search the entire tree.

Uh yes, the obvious implication of my suggestion being that a Trie is
the *correct* approach (i.e. substring is not correct).

-- 
silky

  http://www.programmingbranch.com/

Reply via email to