Forum Academy Marketplace Showcase Pricing Features

Need performance tip. Workflow loads 10+ seconds

Is there a way to optimize it and make it 2 seconds to load? Users can’t leave this page fastly.

I’ve separated “Create” & “Make Changes To DB”, but it is still slow (~7 seconds). I need 2 seconds.

I find that if you create a custom/back-end workflow and hand off the queue, the user doesn’t have to wait for the tasks to be processed. I had similar long social flows (send email, notifications, do many things when a comment is posted, etc). It was slow. Then I moved it to a custom flow and it became fast.

Also, I have seen that flows with multiple “only when” steps get slow, and making separate workflows for each only when is faster (in other words, put the only when in the trigger rather than in the event).

Another thing to think about is does the page/user really need to wait for the workflow to complete? You can hand back control at an earlier point in the flow (reset inputs, etc) if the data is placed somewhere else.

1 Like

The user won’t see that API workflow is proceeding? I wondered to use “Schedule API workflow” 6 seconds after the user leaves this page. I thought it would cause the app to be slow after 6 seconds. I also face an issue that I couldn’t specify “Input A’s value” because the back-end workflow did not see that input.

But as I know it would be the same speed. The app is searching for all events with the same trigger.
The user doesn’t need to wait. But he needs to have changes implemented when he comes back to this page next time.

What do you mean?

That’s the beauty of it: you can send the input as a parameter in the workflow (you can define multiple parameters or use Things).

Screenshot_20200911_104029

Reset inputs after triggering the workflow, unhide the submit button or hidden inputs, etc, so that the user can continue using the site. For example, when a user submits a comment on my app, I hide the submit icon to avoid repeated submission. In the past, the process would take 4-5 seconds, then the comment input box cleared, and then the icon would be shown again. Now, the comment input box is cleared instantly, and the icon is shown again in a blink (while the workflow processes in the background). If the user submits another comment while the first workflow is processing, it just starts a new background flow without interfering with the first (like parallel threads).

1 Like

So, I should use a schedule API workflow?
How to make it invisible for the user and instantly make changes to DB without time rescheduling?

Yes, and you can set the time/date to current time/date. It will be invisible to the user because they don’t get the “bar/loading” for such workflows. You might have to experiment with ordering different events in the workflow. For example, I realized that I could send notifications after making changes to the DB so that the DB was updated faster.

40rrr
:crying_cat_face:

:grimacing: sorry I assumed you were on a paid plan

I still think that you can do some of things we discussed (reordering events, splitting each only when into a different workflow trigger rather than being an event, etc). Or maybe another idea is to use a custom workflow instead of backend workflow. You can send parameters to custom workflow too.

Which plan I need to purchase to get back-end workflows?

I ran into the same issue today @vovahumnytskiy

I need this ability too.

The cheapest personal plan gets you access.

1 Like

which one?

I think I need something like this. Adding a post takes 2-3 seconds. So how does it work?

If I have a workflows that takes 2-3 input fields can I pass those input fields off to a back-end workflow instead? Is there a video on this anywhere?

Yes, you can pass along the input data to the backend. Those are set in the backend, they are called ‘keys’. Then you can choose the ‘key’ type as ‘text’ or whatever your input is. Then you can pass it along to the backend workflow and make changes to whatever you need. You can also send back full data types, to make changes to a thing, or whatever you need.

You can see some examples of some backend workflows here if you want to check it out: https://bubble.io/page?type=api&id=805testapp42&tab=tabs-2

Hope that helps! :blush:

@j805 www.NoCodeMinute.com

For All Your No-Code Education Needs:

  • One-on-One Tutoring
  • eLearning Hub
  • Video Tutorials
  • No-Code Classes
1 Like

Very helpful and I got it working. Is it safe to assume that once the element workflows hands off to a backend workflow the user gets immediate control again? Meaning they are not blocked/waiting for the backend workflow to finish?

Correct. That’s the cool thing about using a backend workflow. It is done on the server, not in the browser. The user could even close the browser and it would still complete the workflow. :blush:

Can I do everything in a backend WF? Meaning, eg, can I pass for input field values to a backend WF for adding a new post? Right now, I have the steps that reference the input field values in the Submit Button element WF and then have that workflow call a backend WF to do things like update other data objects.

Yeah, I can’t think of anything that you can’t do in a backend workflow. I try to keep it balanced though.

The only exceptions I have noticed are some plugins don’t work on the backend. Oh, and also set states, they stay in the browser too, so they can’t be set on the server.

Someone can correct me if I’m wrong. :blush: