jQuery Ajax on success is VERY slow

m4rt1n0

New Member
I have a list with 1000 test items, each Item contains 8 propetys. I have a problem with loading time. When i load the page i run GetListOfTestItems().The time it takes before it hit return in getTestItems() is under 0.56 seconds.Loading time of whole page is 10.78 seconds. Tested in different browsers with same resultAfter ajax hit success it loads right away, so i think extra 10 secnds comes from, when server send result back to ajax. How to imporove loading time? \[code\] [WebMethod] public static List<TestItem> getTestItems() { List<TestItem> list = service.getTestItems(); return list; }function GetListOfTestItems() { $.ajax({ type: "POST", url: 'UserProfile.aspx/getTestItems', contentType: "application/json; charset=utf-8", dataType: "json", error: OnAjaxError, success: addAnsweredQuestions });}}\[/code\]
 
Back
Top