

CATERING SHIFT EXCHANGE FULL
In your case however, i'm not sure that's the full story. Running the calls asynchronously may cut down the overall time needed to complete a given operation from the perspective of your user (which might well be all you need), but in aggregate, the time taken would still be longer for multiple calls. TL DR: All other application considerations aside, performing a single call would be faster than performing multiple calls. It's usually not the optimal approach for high volume e-commerce sites. Although javascript single page app frameworks push you down the api route. The API calls with appropriate caching should be fast within the data center.Īlso, consider having NO client API calls at all. so that the client needs to make only a single call to its own website. Say a master/detail display, where you want to select an option from the master and display the corresponding detail without reloading the master.Ī common design is to keep the separate APIs for coding flexibility and micro-service concerns, but combine the data server side in the website.

However, in practice if you load a page, and then load each part of that page, displaying loading spinners all over it until you get the results back the result is slow and disjointed.įor this reason AJAX requests for data should be used sparingly and only when you have a section of the page which is slow to load or needs to be refreshed on a different cycle to the rest of the page. In Theory the multiple simultaneous calls are more flexible and just as fast.
