Are jquery GETs faster than angular $ http.get

I have an angular application that has multiple calls $http.get

, some of which complement others with success / failure as shown below. After trying to speed up the application, I noticed that changing calls $http.get

to jquery calls makes the application faster. This way jquery calls are faster than angular calls $http

, if so I will change the whole jquery get request.

$http.get('/event/'+ _id);

$.ajax({url: '/event/'+ _id  });

      

Has anyone else noticed this?

+3


source to share


1 answer


I would not expect much benefit, if any. HTTP requests are expensive, your biggest bottleneck will always be the network. Thus, it doesn't matter how fast the code is when the network comes in second. With that said, check the HTTP headers to see which one is more verbose. If you get rid of $http.get

, you will also lose the seamless unit test ability, as now you have to make fun of $.ajax

.



+2


source







All Articles