Monday, March 26, 2012

ListSearch with ~15,000 items under dropdownlist

I have a dropdownlist with around 15,000 items, which can be quite irritating for a user to select the right item.

So, I put in ListSearch to facilitate the selection process, but now I'm noticing that there's about 5 second delay from the moment I start typing the first few characters of the item and the time I actually see the typed characters below my dropdownlist. And 5 seconds is way too long of a delay!!

When I tried the same ListSearch on a dropdownlist with a fewer number of items (say...about 100), then it worked instantaneously.

Has anyone seen similar problem? And how can I make ListSearch work faster?


Thanks.


Hi,

The ListSearch delays any processing until the first time the user starts typing. This is by design (on a number of our components) because if you put a few dozen components in a repeater you don't want them to all do their processing at once when the page loads. I'm a little skeptical that you really want to put 15,000 items in a drop down (instead of providing a search/results selection UI with something like modal popup), but you could probably tweak the ListSearch beahvior pretty easily to start processing the items in its initialize function.

Thanks,
Ted


I agree with you. Putting more than 15,000 items under a dropdownlist is an overkill, but I'm currently migrating our old ACCESS application to ASP 2.0 and it is required to stay with the same dropdown control. Apparently, ACCESS's version of dropdownlist can handle 15,000 items and has the capability of search incrementally. So, I'm kinda stuck with a dropdownlist here. :-(

I guess the users don't want to go through few more clicks with the search/results selection page.


With that aside, what did you mean by "tweaking ListSearch"?? Would you be able to show me an example or direct me to some website where I can look into?

Thanks for your help.

-Brian


Hi,

Get the full source version of the Toolkit and look at the AjaxControlToolkit\ListSearch\ListSearchBehavior.js file. You can experiment with moving the _isSorted check (line 242) from _onKeyDown to initialize (remember to rebuild when you change one of the scripts as they're embedded resources). I think this would help fix the delay you're seeing the first time a user accesses the list.

Thanks,
Ted


Thank You!


I've written a blog post explaining how you can alter the ListSearch Extender to speed up the initialization by giving it a hint as to whether the target list is sorted or not. It is the determination of whether thie list is sorted or not that takes a long time.

http://damianblog.com/2007/06/19/speeding-up-listsearchextender/

If there is enough interest, I'd be happy to add the changes to the control toolkit.


Thank you for this. I will definitely take a look at this and hopefully I'll get the ListSearch Extender to work faster.

-Brian

No comments:

Post a Comment