Concurrent API calls massively slowing down my app

Hi,
Is there a way to stop Bubble from executing multiple SQL API calls simultaneously? It’s really slowing down my app, adding about 10-15 seconds to an RG load and also taking up browser memory.

Context: I am using the SQL Connector API to populate RGs in my app with lots of text data. When a user clicks a button or something, an RG displays the text data in a table.

The data is hosted on a separate MySQL server that is updated with new data continuously. It’s not possible for me to update and host this data on Bubble’s database instead.

When I do individual SQL API requests outside of Bubble the data is retrieved SUPER fast. I.e this appears to be a Bubble issue, due to the concurrent API calls.

My one-page app has about 15 RGs in total, each making unique SQL calls. So, when a user clicks to open and close an RG, the RG table displays or hides data from an SQL API call.

The issue is that although only one RG ever displays at a time, Bubble appears to execute all the individual SQL API connections on page-load. This significantly increases the page loading time (see pic above).

Bubble also appears to execute all the SQL API connections when interacting with the app, say, if a user affects the SQL connection somehow (each SQL connection is dynamic, involving variable search parameters sent by the user). Below is another pic of all the doapicalls while a user interacts with the app.

Is there any way to limit the number of SQL API calls being made by my app?

Hi @Louis-1832 !

Did you already try to make these calls ONLE WHEN the repeating group is visible?

I mean… leave the “Data source” of your repeating groups empty. And in the conditional tab, create a condition to change the “Data source” of this repeating group to whatever you want ONLY WHEN the repeating group is visible. This will probably make you calls happens only when needed.

1 Like