I have an angular app with which has a few $http.get calls some with a success/error funcs others just as below. After trying to increase the speed of the app, I noticed that changing the $http.get calls to jquery calls the app sped up. So are jquery calls faster than angular $http calls, if so I'll change all my get request to jquery.
$http.get('/event/'+ _id);
$.ajax({url: '/event/'+ _id });
Has anyone else noticed this?
I wouldn't expect much of a gain, if any. HTTP requests are expensive, your biggest bottle neck will always be the network. So, it doesn't matter how fast the code is when the network takes over a second. With that being said, check HTTP headers to check which one is more verbose. If you get rid of $http.get you also lose the seamless ability to unit test since you now have to mock $.ajax.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With