Search code examples
c#performanceautocompleteextender

AutoCompleteExtender very slow


I asked this in a comment, but I don't think I'm supposed to ask a second question commenting on the first one. I have AutoCompleteExtender and it is very slow.. The method that gets my list to fill the AutoCompleteExtender has to Get and Query XML from API everytime. The problem is my method, inside of this method I cannot access SessonState, Cookie, even variables from static methods on the same page, so I see no alternative to GET and Query every time. This is SLOW though, really not worth having. There has to be another way (maybe not using the AJAX toolkit) to get this to run fast.

[System.Web.Script.Services.ScriptMethod()]
[System.Web.Services.WebMethod]
public static List<string> GetNames(string prefixText, int count)
 {
    //Code Here Takes long
 }

Solution

  • Editing CompletionInterval , CompletionSetCount, and MinimumPerfixLength does close to nothing.

    It looks like this is a very common problem - AJAX TextboxCompleteExtender being very slow because it queries data everytime - CodePlex has an awesome opensource solution to this problem if anyone else encounters it.