Simple Change List of Things taking 52 seconds to complete after Button Click

Run Mode : 52 seconds
Slow Mode : 12 seconds
Step-by-Step : 4 seconds (as fast as I can click Next)

I’ve tried each multiple times to ensure it’s not just a caching issue.

Hi, all.

I’m having lag and speed issues on Change List of Things within the forecasting app I’m building out.

My ‘Refresh List’ button fires workflows to update a currently short list of 10 ‘Movements’. A number of actions counts a list of ‘Registers’ related to a ‘Movement’.

Because it’s been running so slowly I introduced a change of field value at the beginning to ‘BUSY’ (after saving the existing value which I return it to after the workflow has completed) so I could see when this first element of the workflow actually ran, to see how far it’s getting.

The workflow seems to complete (the orange bar at the top of the screen gets to the right of the screen after 52 seconds), the status’s are updated as far as I can see (the purpose is to monitor the progress of new entries being added in ‘Register’ via an API call triggered from a different workflow). So, on testing there won’t necessarily be a change to the statuses but we should see the effect of my introducing the ‘BUSY’ change.

Please check my app and preview and click the green button on the left panel ‘Refresh Links’.

Do you get the same delay? Am I missing something?

I’m guessing, as I’ve seen similar lags on other areas of my app, that there’s a lag of some sort before it actually gets to start working on the list, and then it’s fast because I don’t ever see the effects of introducing the ‘BUSY’ change which would change the icons to the right of the panel to a rotating arrows.

Thanks in advance for your help.

Richard.

Hi, I can’t view your app, is it set to open?

Hi there, yes, it’s set to view. I can see a couple of bubblers in there at the moment…

The & are encoded in the link to “&amp ;” just change them back to & and the link will work.

That did it. Link is: https://bubble.io/page?type=page&name=movements&id=fflow&tab=tabs-2

Have seen now that the BUSY status is now coming on as the orange progress bar hits the right but it is NOT returning it to the LAST value as per the the first action. Restoring them now.

Just a couple of clarity questions. You mean orange button not green right? And it is Refresh List not Links right? You call it List early in the post and Links later.

In any event, it is taking about 7 to 10 seconds for me every time. Am I supposed to be seeing anything in the space under the ‘Refresh List’ button?

From a brief look, it looks like you’re performing way too many “Do a search for” operations. These are slow and you need to design your application in such a way as to minimise having to do them. Even signing up on your application is taking a good 8 seconds or so because you’re doing 4 separate “Do a search for” operations.

Hey @mguerrasio, yes, sorry, Orange button! And ‘Refresh List’. Have had my head deep into this for too long!

If an API to create some Registers was running we’d see an update of the Register Status (which at the moment is identified by the top of the 4 small text lines to the right of the Movement Name in the Repeating Group.

Ok, so 7 to 10 seconds is much better than 50 to 60 seconds.

Do you think 7 to 10 is ok / expected for what it’s doing in the Workflow?

Also do you know why the Workflow processes faster with Slow or Step-by-Step? I see this a lot across all of my Workflows. In fact I’m having to build and test it using Slow and SbS because Normal mode is just too slow or in some cases Bugs out.

Thanks.

The signing up / in lag was something I was going to come back to! I’m new to this. Isn’t Do a Search for a necessity with database work? How else can I interrogate? Is there a quicker / better way to do it. I’ve been using this and trying to condition the search to minimise it?

@dambusmedia, thanks for looking in. Do you know why, depsite too many 'Do a search for’s it would process faster in Step-by-Step or Slow mode than in Normal Mode. It’s an issue I’m having across the app? Thanks.

No, I don’t, sorry. I can only imagine that if it’s that much quicker in Step-by-step mode, the debugger might be skipping steps or not doing the full searches. Do the results of operations in run mode vs step-by-step mode match exactly?

I find sometimes it’s the other way round oddly, that Normal Mode looks like it’s finished and completed the workflow but values haven’t changed that I’d expect to have. Then I use Slow or SbS and it returns the values I’d expect. Very odd. Thanks anyway. Help greatly appreciated.

My guess would be that the page data and the workflows are tripping over each other. So when you “pause” the page the workflows get a free run at the database.

But the issue is really your database, sorry, it sort of looks like it was an Excel s/s once ?

You seem to have an awful lot of list fields that are lists of texts. And none that are links to other tables. So bubble is going to have to search the entire table each time.

The way table relationships work in Bubble is by having relationships defined by having lists of things in other things. Or relating a thing to a “parent” by referencing it directly.

Without a database that is structured like this you have to do searches all the time, and that means a full table search each time.

Happy to help ! But I think you need to go back to start and think about how your data relates to each other. It looks really complicated at the moment.

1 Like

That’s a great point, I reckon that’s definitely it. Looks like there’s a lot of workflows running at intervals.

I did try turning off, terminating, and significantly extending the intervals of any repeating ‘every x seconds’ workflows and it didn’t make a difference to these things. But all good info for me to think about.

Hi Nigel, thanks for looking in and coming back to me. Excel has been my tool for twenty years with a little bit of Apex on Salesforce thrown in along the way. So not up to speed on how it works so I’m guessing you’re right about the database structure. I’ll be looking into this. Very useful feedback. Appreciate it.