How to Cut Bubble Workflow Units and App Load Time
Bubble apps often get slow between months six and twelve. The cause is rarely the platform. It is a data model that grew, searches that run on every page load, and workflows that repeat the work another workflow already did.
Bubble bills in workflow units, and the same patterns that make an app slow also burn units. Fixing one fixes both.
Why is the first page load slow?
The most common reason: a repeating group with no constraints, no pagination and every row doing a search of its own.
A list of 200 orders where each row searches for its customer is 201 database queries for one page. That is the cost driver, and it is invisible in the editor.
Fixes, in order of effect:
- Constrain the search at the group level — filter by the parent record, not inside the row.
- Store the repeated value on the row — denormalising a customer name onto the order costs storage and saves a query per row.
- Paginate at 12 to 20 items and use infinite scroll rather than “show all”.
That trio typically turns a five-second page into under a second.
How do you find which workflows burn units?
The app’s usage dashboard shows unit consumption per workflow. Sort by total, not by average — a cheap workflow called 4,000 times a month costs more than an expensive one called ten times.
Two patterns show up constantly:
Searches inside a scheduled workflow. Each scheduled run re-searches the database. Cache the result in a custom state or a cache data type instead.
Conditional steps that always evaluate. A workflow with six conditionals runs six checks on every trigger. Move mutually exclusive conditions into separate workflows triggered by events.
When should you use custom states instead of database fields?
Custom states live in the browser session. Any value that does not need to persist — a selected tab, a draft form, a filter choice — belongs there, not in a database field.
Writing a database field triggers a re-render and often a search. A custom state does not. On forms with ten field changes, moving drafts to a custom state and writing once on submit cuts both writes and unit spend.
What does optimisation cost you in maintenance?
Denormalised fields need updating. If you copy the customer name onto the order, a name change updates in one place and not the other, so you need a workflow that propagates it. That is real maintenance and it is worth it above a few hundred rows.
Caching means stale data. A custom state that holds a list does not refresh when the database changes. Decide a refresh trigger — a page reload, a button — and accept the window.
What is not worth fixing
Styling. Page weight matters, but a fuzzy image is not the reason a list takes four seconds.
Plugins. Removing a plugin rarely saves meaningful units unless it is doing a search on every render; check before you refactor around it.
Small apps. Under a few hundred active users, a Bubble app with a naive data model still responds fast. Optimise when a real person complains about a real page.
Quick Summary
- List pages that search inside each row are the main cost: constrain at the group level, denormalise repeated values, paginate at 12–20.
- Sort the usage dashboard by total units, not average; frequently-called cheap workflows dominate.
- Move non-persistent values to custom states; write to the database once on submit.
- Denormalising and caching add real maintenance — worth it above a few hundred rows.
- Skip styling and plugin tuning until a real page is measurably slow.
