Calling AJAX methods in parallel increases server response time?

23 views Asked by At

I came across a piece of code where the methods where being called as callbacks

function a()
{
  $.get("/Controller/Action", function (data) {
    b();
}
}

function b()
{
  $.get("/Controller/Action", function (data) {
    c();
}
}

There network calls As callbacks

Now instead of calling them as callbacks, I made them to be called together concurrently

a();
b();
c();

I expected improvement but I see a weird thing enter image description here

Why would the server response time increase? I have tested many times. I never really get the response time like I would get using the first way.

0

There are 0 answers