Bubble Workflows Are Slowing You Down — Here’s How to Fix It (And Save Workflow Units)

Dennis H. Lewis shows how to speed up Bubble apps and cut workflow unit costs. Split front-end and back-end workflows, use custom events to run queries once, and chain dependent steps with 'Result of Step' to enforce order. Batch operations with 'run workflow on a list' beats recursive workflows.
Chapters
Let me ask you something. Are your bubble workflows slowing your app to a crawl and draining your wallet of workflow units? If you're nodding your head or groaning at the latest bubble invoice you received, stick around. Because today I'm revealing the exact workflow secrets we use to make bubble applications blazingly efficient. And don't just take my word for it. These are the techniques powering fast scalable apps for founders and startups in the world. And today you're getting them all step by step. And be sure to check out the link in the description below because we've put together an awesome no code resource center just for you. It's packed with templates, with plugins with how to videos with great books to read, and a whole bunch more just to make your app building more successful in bubble. Dennis, I'm Dennis Lewis here from Ratio. Let's jump in. Look, bubble is an incredible tool. You can build and launch like a wizard. But here's the catch. As your app grows, it will tend to get slower. Workflows get slow, users start complaining and bubble starts charging you for every extra workflow unit. Which means you either have to go up a plan or you have to start optimizing Translate all this speed and efficiency are your ticket to happy users, to lower cost, and honestly, to keeping your sanity as your app grows. Most first time bubble builders lump everything into one big workflow of salad. But here's the secret. Split your workflows up front end for anything that the users see and they need to interact with immediately and backend for heavy lifting and anything you want to run quietly without disturbing your users. What does this actually do? Well, your app will feel lightning fast. Heavy processes won't freeze your user interface bubbles. Workflow units get used exactly where they're needed and nowhere else. So as a metaphor, think of it like a restaurant. The front end is the smiling waiter who's taking your order. He's quick, he's responsive, it brings your drinks, interaction with the customer. And the back end is the chef in the kitchen, the cook who's cooking up the magic. And he doesn't even want to bother with the customers. And if the waiter and the chef work well together, it creates an awesome experience for you in the restaurant. Let's jump into some of the details of what you need to do to keep your workflows as efficient as possible. First of all, set up privacy rules. Not only do they protect your data, but they will speed things up. Here's what most people get wrong. If your Privacy rules are too loose. Bubble wastes time loading data that it doesn't need. But if they're too tight, you'll start seeing weird glitches and things won't work like you expect them to. So you need to set clear, logical privacy rules on every data type, at least every important one. Limit each user to what they absolutely need access to. So all those other fields that they don't need to actually interact with the user, they shouldn't be available in the privacy rule. And hide all the sensitive fields by default. Because this isn't just about security. It actually speeds up your queries, because the privacy rules run before the database queries, so that means less data moving. That means everything goes faster. Next step, Custom Events and All right, the next thing I want to share with you is what I call a ninja move. If you've ever run the same database search in four or five different workflow steps of your workflow, stop doing this. Instead, set up a custom event at the very beginning that runs that search once and pass the result of the search as a return value from that workflow. And then throughout the rest of the steps of your workflow, you can just reference back the result of that first step. And that way you are able to only use the query once, and you can use it all through your workflow. It's kind of like sending one intern to grab coffee for everybody in the office instead. Instead of sending four different interns all to do the same thing. It's less blunt, it executes faster, it's easier to maintain, and you're only paying for those workflow units one time because you're just referencing the results every time after that. Similarly, I want you to chain your steps of your workflows in the smart way. So here's a good bubble tip. If you have steps in your workflow that depend on something happening prior, always reference using Result of Step one Result of Step two because level will assure itself that it does Step one before Step two. I'm sure by now you've heard my videos. I tell it all the time that it's really important you understand that a workflow, even though it looks sequential in the bubble builder bubble executes all the steps in parallel. Unless you're either using a custom event or you're using the result of step and referencing a prior step, this will eliminate those synchronicity bugs. You won't get those confusing oh, why isn't this database updating? Right? Because your things will go in order and that's how they should Go. The next thing I want to talk to you about is the power of run workflow on a list. Back in the old days, we did everything with recursive workflows in Bubble because that was the only safe way to execute a workflow sequentially over a list of database items.
The problem with recursive workflows, they're more complicated to maintain and they consume a lot more workflow units because you're constantly scheduling new API calls. And so Bubble made a big improvement to the schedule a workflow on a list function. And so whenever possible, I recommend that you use that. There are times for recursive workflows, especially if you need to make sure that you know one executes before the next, because scheduling on a list will run them in parallel. And that can create a problem if you're not careful about how you've built your workflow. But in most cases, it's faster, it uses fewer workflow units, it's easier to maintain. So definitely recommend run workflow on a list. The next thing I want you to do is keep your workflows tidy by creating a toolbox, a reusable element that you can call my workflows, that you can store custom events in that reusable element for any workflows that you want to be able to access in multiple places in your application. This way you can use the trigger a custom event from a reusable element function and reuse that same custom event all over the place. You just take your reusable, you put it on the page, and now you have access to that toolbox of workflows you've built. Important for this is that you're not copying workflows from one page to the other. Not only does that save you time and effort, but it makes maintaining those workflows much easier. Because otherwise, if you find that you have a bug or you need to improve a workflow and you've got it copied over seven different pages, then you've got a nightmare of maintaining it, having to go and change it seven different places. So really good for keeping your application structured well and orderly. Finally, let's do a quick recap of what we've seen. First, split your front end and back end workflows apart and keep as much functionality in the back end as you possibly can. Set up sharp privacy rules so that you're not moving around data that you don't need to leverage custom events for data reuse inside your workflows and to store you only run a queries once in the workflow Chain your steps correctly using result of step 1, 2, 3 batch operations with run workflow on a list instead of building recursive workflows if you can, and centralize all of those reusable workflows in a reusable element that you can reference from any page within your application. So these are the pro secrets that turn sluggish, expensive bubble applications into lean, mean money bubble applications. Now, just to conclude, please remember to grab free access to our Resource center with all those videos and how to guides and vetted plugins. And I hope you really enjoyed this video. If you have give it a thumbs up, subscribe for more content like this on our channel and I will see you in the next video.
More from Dennis

Is Google Killing Websites? The Future of Search, SEO & Web Design After Google I/O

Something we're still looking forward to in Bubble: richer design experiences! #bubble #nocode #ai

Big mistake companies are making right now: firing employees instead of empowering them. #ai







