I need a solution for SLOWING DOWN repeating group data

My app has a button that any user can press which adds a new data entry to a repeating group that all users can see (like a timeline). The problem is there could be dozens of users clicking the button at the same time which would make the timeline entries unreadable as new data is added.

Some solutions I thought of would be A) letting a user somehow pause the timeline, B) force the app to only update the timeline every 10 seconds, or C) force the user to manually refresh the timeline when they want to see new data.

What do you think is the best solution and how do I implement it in Bubble?

Hi there, @quothisdead !

Regarding the timeline updates, it’s important to consider whether having real-time updates every second is crucial for the user.
If it’s not critical, option B would be more convenient. This option doesn’t require any action from the user, and they may not even notice the 10-second delay in the timeline updates.

It’s not crucial they see updates in real time so all solutions will work.

How would I build option B into my app with bubble? I’m relatively new to this

1 Like

That’s good, for this situation is better to use backend workflows.

In the backend workflow section, you can do it in several ways. You can create a helper variable and make your timeline conditional on its status. And on the other hand, check if any data has been added in the last ten seconds , change the state of the variable.

Unfortunately, it is very difficult to give a complete explanation, if the problem is not solved with this thread, tell me and I will make a sample for you.

Remember that you need a paid plan to work with backends workflows.

All of your solutions would be implemented in the same way in Bubble. Which is to say, grabbing the timeline data, storing it somewhere client side (not as a live database query, so for example, in a custom state or similar that only updates when you say it should) and then updating that state when you want to.

BTW, polling (“doing something every X seconds”) is, in general, dumb and not the way we do things in web applications, though you’ll find a client-side implementation of this in Bubble’s event triggers.

Your post is quite vague and doesn’t really provide enough information for anybody to advise you further, TBH.

2 Likes

Everybody I asked has recommended sending the timeline data to a Custom State so I have to assume that is the standard way to do this, but unfortunately as a beginner even after watching half a dozen video tutorials I couldn’t figure out how to use Custom States for my use case.

However I experimented and ended up solving it another way for anyone who is interested…

This makes it so my repeating group timeline only displays “Idea” data entries that are over 1 minute old, and it has the added bonus of not displaying newly created ones unless the User refreshes the page (not exactly sure why), so I added a simple refresh icon in the UI. So in the end I was able to combine both option B and option C from my original post.

1 Like

Because Current Date Time in that search expression is only evaluated when the expression is evaluated, AFAICT.

You would use the Set State of an element action.

2 Likes

This topic was automatically closed after 70 days. New replies are no longer allowed.