IntelliSense (Microsoft) is much more than a filter or sorting mechanism.
Knowing that it incorporates some reflection, I took the lazy route to
educating myself a little and looked on Wikipedia. And, on Silky's hint, I
checked out trie data structures (interesting). 

It may be worth looking there for autocompletion (and IntelliSense), and
elsewhere for some more specific guidance or hints. 

 

  _____  

Ian Thomas
Victoria Park, Western Australia

  _____  

From: [email protected] [mailto:[email protected]]
On Behalf Of Winston Pang
Sent: Monday, 17 May 2010 7:41 AM
To: ozDotNet
Subject: Filtering algorithm strategies to mimic intellisense

 

Hey everyone,

So I'm building a intellisense like autocomplete. I've stumbled on some perf
issues because its literally just iterating over the list and re-applying a
filter function on every item, based on every key stroke. The perf degrades
obviously as more times is in the list.

I was wondering, does anyone have any strategies or past expeirence with
smarter ways to filter a list. Now this list is just a list of a custom
objects, with a particular display field that is a string. Filtering is
filtered based on a contains for each item. So it's essentially mimicing
VS2010's contains for intellisense.

The VS2010 intellisense seems to be extremely speedy.

Cheers,


Winston

Reply via email to