Occasionally my app needs to populate multiple content areas via simultaneous jQuery .load()
calls.
Despite the content areas loading in under 100ms, the more simultaneous requests in place, the slower the content is displayed on the document. Sometimes this can be as long as 10-15 seconds for 6 content areas.
Loads are initiated as follows:
$("#MyDiv1").load("/My/Controller/Action/1");
$("#MyDiv2").load("/My/Controller/Action/2");
$("#MyDiv3").load("/My/Controller/Action/3");
...
Any suggestions on how to combat this bottleneck would be appreciated.
ASP.NET handles one request at a time under the same Session. So the second request won't run until the first one has completed. That's to avoid threading issues. You should see some improvement if you use Sessionless controllers.
Check out this link:
What are some scenario's of having a Session-less Controller in ASP.NET MVC3?