Perceived speed with API calls

I’ve created a repeating group on a blank page (for testing purposes) and used the BubbleAPI plugin to call an external API that is returning about a dozen records. Entire JSON response is about 12kb of data.

When page is refreshed, it takes about 4 seconds before the repeating group data is visible. This isn’t a good user experience. However, the API call itself averages about 2.8 seconds.

  1. I do see some lag before the initial API request is made from Bubble (1 - 1.5 seconds) . Can this be improved?

  2. I can’t make the API response faster, so what approach can I take within Bubble to give a better user experience? Maybe preloading API data? I’m not sure the best way to approach this.

Any insights appreciated. Thanks.

I suggest having some kind of loading screen. Many large sites have nice loading screens. Check out Facebook and other sites like that to see what kind of user experience they give. Gives you an idea on how to resolve that issue while waiting for bubble to improve speeds. Sometimes a simple loading screen satisfies many users. Just an idea. Hope this helps. :slight_smile:

It’s been my experience that a lot of the speed depends on the plan you’re on. I have only anecdotal evidence, but Bubble seems to throttle the API workflow speed. When I added ~40 units everything loads fairly quickly. You might want to test to see if you experience the same.

Production also has caching whereas Dev does not, so that could also contribute to some of the load time.

I’m trying to avoid a loading page, as this is just one element (repeating group) on the page. It would be frustrating as user navigates to have entire page locked down while a single element loads. But, maybe I can add a loading spinner to jsut the repeating group?

That’s good to know about the caching in dev mode and may help shave some time off. Unfortunately, most of the wait is due to the API itself which is making a SOQL query to Salesforce and building the JSON.

Right, just make something load for that repeating group, just like facebook does when its loading their information. If it’s nice enough then no one even minds it.

Hello did you try to boost Bubble with additional Units ? On my side there is a huge difference between accessing data in the database and trough API call.