Note that there are some explanatory texts on larger screens.

plurals
  1. POajax autocomplete performance issues to hit the db or filter the pre-cahced results
    primarykey
    data
    text
    <p>In my existing asp.net application, i have a ajax autocomplete control, which uses a web method to get the autocomplete results which intern hits a stored procedure. But since hitting the db every time is costly and a performance issue, we wanted to cache all the lookup results which is around 45,000 rows and use the cahced data to filter out and get the data. </p> <p>we are using linq query to filter by using contains method to check the prefix. But if i use the cached data filtering, it takes much longer than the original implementation which hits db everytime. </p> <p>Is there any approach you can suggest me, which can give a much quicker result set retrieval when the user types the data in the UI.</p> <p>I know that maintaining 45k no.of rows and filtering that would be a real pain. Hitting the db would be much more better approach. </p> <p>Since we are facing some performance issues, please let me know any better approach.</p> <p>Replacement of Ajax autocomplete with Jquery autocomplete plugin makes any difference..?</p> <p>Code: Just like any other ajax autocomplete code: </p> <pre><code>&lt;ajaxToolkit:AutoCompleteExtender runat="server" ID="autoComplete1" TargetControlID="myTextBox" ServiceMethod="GetUserList"&gt;&lt;/ajaxToolkit:AutoCompleteExtender&gt; [WebMethod] public string[] GetUserList(string prefix) { return UserManager.GetUserNamesBySearch(prefix); } public string[] GetUserNamesBySearch(string prefix) { List&lt;User&gt; userCollection=UserServiceMgr.GetUserList(prefix); var filteredUsers=from user in userCollection Where user.FirstName.contain(prefix) select user.FirstName. filterdUsers.ToArray(); } </code></pre> <p>Thanks in advance</p> <p>Suri</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload