I've been dedicated to developing a Single Page Web App (SPA) recently. The frontend is built with BackboneJS/Marionette, while the backend is powered by Java Spring :(
. However, I've noticed that the application's start time could be sluggish due to multiple requests being sent to various API endpoints to fetch data for different parts of the app. Even though these are AJAX requests and run asynchronously, it still seems slow. What would be considered best practice in this situation? Initially, I was contemplating consolidating all data into one extensive request, but I'm not certain if that's optimal. Any guidance or code examples would be greatly appreciated.