I’m working on an existing SPA project where the layout page has several Server Connects running on load. What I’ve noticed is that they seem to run in a random order, and there doesn’t appear to be a way to control which ones execute first. This becomes a problem on pages like the dashboard, where the most important data should load quickly. But instead, less important SCs sometime run first, making the page slower to load.
A client has recently pointed out the slow loading, which is what prompted me to take a deeper look into this. Is there a way to manage or prioritise the execution order of Server Connects on a layout page in a SPA? I’d really appreciate any insights.
Placing them within flow would probably make them asynq? I actually have never noticed this myself, but should keep in mind for the projects made in Wappler
Thanks for the suggestions; both approaches definitely help control the execution order of Server Connects. The challenge is that they require turning off auto‑load for every SC further down the chain. In a larger project with 20–25 (or more) Server Connects on a layout page, manually triggering each downstream SC for CRUD operations can quickly become difficult to manage.
Ideally, it would be great to have an option to define the execution order directly, especially for layout‑level SCs in a SPA. I’m not sure what’s technically feasible within the App Connect framework, but having some form of built‑in prioritisation would make this much easier to handle.
Sometimes simply placing the server connect elements at the bottom of your page structure will take care of it.
But you can also put the server connect elemensts in a conditional region that opens up at the appropriate time. For example call it “low priority” and toggle that once the “high priority” items have completed (on done, on success, etc.). This allows you to keep auto load, but controls when that auto load starts.