Bubble is infinitely flexible — there’s an endless list of apps you can build and an endless number of ways to build them. Finding the right way for your specific use case can have a big impact on how many workload units (WU) your app needs (and therefore which of Bubble’s pricing plans might be right for you).
Bubble is infinitely flexible — there’s an endless list of apps you can build and an endless number of ways to build them. Finding the right way for your specific use case can have a big impact on how many workload units (WU) your app needs (and therefore which of Bubble’s pricing plans might be right for you).
In this article, we’ll help you optimize your workload so you can make your app leaner and more efficient and get the most bang for your buck. We’ll cover three things:
What drives workload consumption
How to understand your app’s current workload
Some common practices that might drive workload up, and alternative ways to build more efficiently
One quick note before we dive in: There’s no textbook definition for the best way to build your app. Every app is different. However you choose to get there, more efficiency means better performance for your app and your users.
What drives workload usage up?
Workload, by definition, measures the work that Bubble does to host, run, and scale your app. In other words, this is Bubble’s way of quantifying all the underlying server activities your app does as it runs.
We’ll explore some specific examples further down, but the bottom line is this: Make your app do just the work it needs, exactly when it needs to.
Workload units (and by extension, server resources) are a resource meant to be spent, and optimizing is the process of removing unnecessary activities.
To understand how your app can be optimized, it’s useful to look at it through our optimization framework, consisting of three components:
Complexity is about how you achieve a goal. Are you as efficient as possible, or could you simplify the process to reach the same result?
Volume is about being aware of the amount of data the server is returning when you give it a request.
Repetition is about inspecting how frequently a given task is being performed on the server, and taking a critical look at whether that repetition is necessary.
This framework is designed to identify where WU consumption is excessive, rather than reducing it to the absolute minimum. You can read more about this framework, and methods for optimizing, in our article series on Optimizing workload.
How do I understand what’s driving my app’s current workload?
Bubble has a set of charts to help you understand your workload usage and identify its biggest drivers. Within your app, visit the Logs tab, then look under App metrics.
The bar graph shows an aggregate measure of how much work your app has done over a period of time, and the pie chart gives you a detailed breakdown of the different areas contributing to your overall workload. You can also drill down into a particular category by clicking on it.
Some common workload optimization opportunities
After you learn the basics about how to use your workload in this blog post, you can learn how to how to manage workload as you continue to scale.
The Bubble Manual also has a few common optimization opportunities to keep an eye out for as you look into improving your workload usage. In the Workload section of the Bubble Manual, we included examples of how agencies are optimizing workload and reducing consumption up to 400% and an optimization checklist for you.
Workload efficiency isn’t an exact science
Your app is unique, and no two workload journeys will be the same. Don’t be afraid to use trial and error — take it step by step, examine your charts, make gradual changes, and measure the impact as you go. Experiment with different solutions to find the best workload configuration for your app.