json - ASP.NET MVC JsonResult Very Slow -
I have a webapp web service, I'm returning a Jason string returning controller, methodology, but I also do JsonRequest does not affect this result.
Here is the relevant code (keeping in mind that Action Prototype now gives ActionResult:
debug.statformat ("{0} - Get Campaign Data: {1 } ", DateTime.Now.ToString (" hh: mm: ss.fff "), 1)); // Here is the data that we need for current user var = Context.Users.Where (n = & gt; n.UserID == userId). Single (); Var location = context.place. Where (n = & gt; n.CampaignID == Campaign CampaignID & amp; amp; N. disabled == incorrect); Var question = reference questions. Where (n = & gt; n.CampaignID == Campaign CampaignID & amp; amp; nactive = = false). (N = & gt; n.QuestionType). (). Orderbase (q = & gt; q.SortOrder); Var nature = reference Display Where (n = & gt; n.CampaignID == Campaign.CampaignAd) .Oolist (). Orderbie (D => D.); Var Answer = Reference. answer. Where (a => a.active == incorrect). (Locations, answer => answer = location id, लोक => loc.Locatio NID, (answer, public) => ans) .toList (); Var contact = context contact. Where (C => C inactive == incorrect); Debug. Line (string format ("{0} - get campaign data: {1}", date time.Now to string ("hh: mm: ss.fff"), 2)); Var json = new {success = true, data = new {user = currentUser.ToModel (), Campaign = campaign.ToModel (), location = locations.ToList () ToModelsSpecial (Answer, Contact), Question = questions.OrderBy (Q = & gt; q.SortOrder) ToModelsSpecial (), Disposition = dispositions.ToModels (),}, message = (string) null}; Debug. Line (string format ("{0} - get campaign data: {1}", date time.Now toastring ("hh: mm: ss.fff"), 3)); Var Reaction = Jason (Jason, Jason Wuveveer, Elove Gate); Debug. Row (string format ("{0} - get campaign data: {1}", datetime. Now.tostring ("hh: mm: ss.fff"), 4)); Return feedback;
You can see that I have a debug. The pause line to debug is how long the output takes, I can track it.
The problem is that DB questions only take 2 seconds.
And yet I get the result of not meeting for another 25 seconds on the client. I am using a program like Fiddler to test this. This is on my local machine, so there is no internet problem.
The Jason String returned is 800k as it is all local so I hope that 25 seconds will not be expected.
I am running the site on IIS8 8 Windows.
Can anyone tell me how much time it is taking to get the ActionResult client back?
Take a look at this post. I believe you are having the same problem, and the fix was simply replacing the plugin:
Comments
Post a Comment