My issue is slow page loading. Iv’e optimized many many things but still it endures. My Frond end is build with Bubble and my backend is built with Xano.
I analyzed the front end loading slowness (with Sentry) and see that the reason might be with UI elements which await data from the backend (I have one main backend API for all data)
My planeed solution is to put all ui elements inside a group which will be visible only after data finished loading but I really want to understand better the mechanism of bubble rendering the UI, so my questions are:
Will rendering get stuck if ui element has a condition based on dynamic data which didnt arrive yet?
Will rendering get stuck if UI element has a data source based on dynamic data which didnt arrive yet?
Workflows that arent triggered on page load but do depened on dynamic data that didnt arrive yet can slow page load?
Disabled workflows that depenet on dynamic data that didnt arrive can slow page load?
The easiest part to control is data fetching - what data, how much data you’re fetching, and if you’re using an external backend, how you’re fetching it.
The steps before that are a little more opaque. You can get a faster LCP by ensuring most of your elements don’t depend on data. Suppose your main dashboard checks Do a search for X:first item is not empty before displaying. That’s going to block all child elements from rendering until that data is fetched.
Then, if you have other conditions dependent on the visibility of that element which also fetch dynamic data, those can necessarily only be fetched in sequence after the previous data is loaded. That can add up to create slow page load times.
I will block the main group untill relevant data is loaded to try to shorten LCP time
Do you maybe have any other tips beside that regarding loading times? My app is a Single page app with multiple reusable elements as pages and other reusables nested inside them. Its not super complicated but does have a lot of elements
Also, do you know of any way to measue the app size? like json file and all the stuff in it? I wonder how big/complex my app actually is
The way we solved similar problem was to draw each component in the page, write down the data they absolutely need, and load that data from an individual endpoint.
If you use one fetch for all, that would be a problem. Even if you have same data needed in many places (e.g. user name), you can fetch that from your backend separately and set it to the page state to make it available for entire page.
I am not sure what the current state of Bubble is (it has been 4 years) but you must do some caching on the frontend so you dont fetch data unless the data changes.