Bubble Docs
  • Introduction
  • New? Start Here
  • What is Bubble?
  • The Glossary
  • User manual
    • Getting started
      • What is Bubble?
      • Building your first app
        • Planning features
        • Database structure
        • Design and UX
        • eCommerce and payments
          • Shopping cart
          • Checkout page
          • One-time payments
          • Subscriptions
          • Marketplace
      • Creating and managing apps
      • The Bubble editor
        • Tabs and sections
          • Design tab
            • The element tree
            • The property editor
          • Workflow tab
          • Data tab
          • Styles tab
          • Plugins tab
          • Settings tab
            • Application settings
              • Custom headers/body
              • Visual settings
              • Social media sharing
              • Translating your app
              • Email settings
              • Collaboration
            • Custom domain and DNS
          • Logs tab
        • Tools
          • Key features
          • The search tool
          • The Issue Checker
          • The element tree
          • The element property editor
          • The debugger
          • Notes
        • Previewing your app
      • Transitioning to Bubble from...
        • JavaScript
        • HTML and CSS
        • SQL
    • Design
      • Elements
        • The element hierarchy
          • The element tree
        • The page
        • Containers
          • Groups
          • Repeating groups
          • Table elements
          • Popups
          • Floating groups
          • Group focus
        • Visual elements
        • Input forms
          • Text and numbers
          • Dates and time
          • File uploads
          • Selection controls
        • Reusable Elements
      • Styling
        • Color variables
        • Font variables
        • Styles
        • Custom Fonts
      • Responsive design
        • Building responsive pages
        • Legacy articles
          • The Basics (Legacy)
          • Building Responsive Pages (Legacy)
          • Migrating Legacy Pages
          • Tips When Designing (Legacy)
      • Templates
      • The Component Library
      • Importing from Figma
    • Data
      • The database
        • Data types and fields
        • Creating, saving and deleting data
        • Finding data
        • Displaying data
        • Protecting data with privacy rules
        • The database editor
        • Export/import data
          • Exporting data
          • Importing data (CSV)
        • Working with location data
        • Using Algolia
        • Database structure by app type
          • Marketplace Apps
          • Directory & Listings Apps
          • Social Network Apps
          • SaaS Apps
          • Project Management Apps
          • CRM Apps
          • Professional Services Apps
          • On-demand Apps
          • Documentation/ CMS Apps
          • Applicant Tracking System (ATS) Apps
          • Portfolio Apps
          • Gallery Apps
          • Online Store / Ecommerce Apps
          • Blog Apps
          • Messaging App
          • Dashboards
          • Building Block Apps
          • Bubble as a backend
      • Files
      • Images
      • Static data
        • App texts (translations)
        • Option sets
      • Temporary data
        • Custom states
        • URL parameters
      • User accounts
        • Authentication plugins
          • Facebook plugin
          • Fitbit plugin
          • Google plugin
          • Instagram plugin
          • LinkedIn plugin
          • Pinterest plugin
          • Slack plugin
          • Wistia plugin
          • YouTube plugin
        • Cookies set by Bubble
      • Time, dates and time zones
    • Logic
      • The frontend and backend
      • Workflows
        • Events
          • Frontend events
            • Recurring workflows
            • Custom events
          • Backend events
            • Database trigger events
        • Actions
        • API Workflows
      • Dynamic expressions
      • Conditions
      • Navigation
        • Single-page applications (SPA)
        • Multi-page applications
        • Page slugs
    • Workload
      • Understanding workload
        • Activity types
        • The workload calculation
        • Client-side and server-side processing
      • Tracking workload
        • Measuring
          • Using App Metrics
        • Monitoring
          • Workload notifications
          • Infinite recursion protection
      • Optimizing workload
        • Optimization framework
        • Optimization checklist
          • Page load
          • Searches
          • Workflows and actions
          • Backend workflows
        • Agency showcases
          • Minimum Studio
          • Neam
          • Support Dept
    • Security
      • Bubble's security features
      • Planning app security
      • Client-side and server-side
      • Bubble account security
      • App security
      • Page security
      • Database security
      • API security
        • API Connector security
        • Data API security
        • Workflow API security
      • Flusk
        • Overview
        • Flusk plan features
        • Getting started with Flusk
        • Flusk security tools
          • The Issues Explorer
          • Issue details
          • Tools and settings
            • Pages rating
            • Database rating
        • Flusk FAQ
      • Cookies
      • Security checklist
    • Publishing your app
      • Web app
      • Native mobile app
        • Global native mobile settings
        • iOS App Store
        • Google Play Store
        • Publishing FAQ
    • AI
      • Generate apps with AI
        • About AI app generation
      • AI page designer
      • Connect to AI agents
    • Maintenance
      • Collaborators
      • Version control
        • Best practices: Version control
        • Transitioning from the legacy version control
        • Terminology: Version control
        • Version Control (legacy)
      • Commenting
      • Database maintenance
        • Copying the database
        • Restoring database backups
        • Bulk operations
          • Bulk operation methods compared
        • Wiping change history
      • Performance
        • Hard limits
        • Capacity Usage (legacy)
        • Notes on queries
      • SEO
        • Introduction to SEO
        • SEO: App
        • SEO: Page
      • Testing and debugging
        • Introduction to testing and debugging
        • The debugger
        • The server logs
        • Supported browsers
      • API workflow scheduler
    • Integrations
      • API
        • Introduction to APIs
          • What is a RESTful API?
        • The Bubble API
          • Bubble API terminology
          • Authentication
            • How to authenticate
            • No authentication
            • As a User
            • As an admin
          • The Data API
            • Data API Privacy Rules
            • Data API endpoints
            • Data API requests
          • The Workflow API
            • Workflow API privacy rules
            • Workflow API endpoints
            • API workflows
              • Creating API workflows
              • Scheduling API workflows
              • Recursive API workflows
              • API Workflow Scheduler
              • Case: Stripe notifications
        • The API Connector
          • Authentication
          • API Connector security
          • API guides
            • OpenAI
              • Authentication
              • Calls
                • ChatGPT
                  • Chat
            • Google Translate
              • How to setup Google API keys
          • Streaming API
        • API security
        • Plugins that connect to APIs
        • API Glossary
      • Plugins
        • What Plugins Can Do
        • Installing and using Plugins
        • Authentication plugins
        • Special Plugins
      • SQL Database Connector
      • Bubble App Connector
      • WorkOS
        • WorkOS SSO
        • WorkOS API
    • Infrastructure
      • Sub-apps
      • Bubble release tiers
      • Hosting and scaling
        • How Bubble hosting works
        • Scaling with Bubble
        • CDN (Cloudflare)
        • Bubble app names
        • Domain and DNS
      • Compliance
        • GDPR
        • SOC 2 Type II
        • HIPAA
        • Other frameworks and standards
    • Bubble for Enterprise
      • Hosting and infrastructure
        • Dedicated instance
          • The Dedicated editor experience
          • Technical specs
          • Main cluster dependencies
          • Customizable options
          • Migration process
            • Pre-migration
            • During migration
            • Post-migration
      • Security and compliance
        • Single sign-on (SSO)
        • GDPR
        • SOC 2 Type II
        • HIPAA
        • Other frameworks
        • Bubble's security features
      • Admin and collaboration
      • Priority support
      • Billing and Payment Guideline for Dedicated Instances
  • Core Reference
    • Using the core reference
    • Bubble's Interface
      • Design tab
      • Design tab (Legacy)
      • Workflow tab
      • Data tab
      • Styles tab
      • Styles tab (Legacy)
      • Plugins tab
      • Settings tab
      • Logs tab
      • Template tab
      • Toolbar
      • Top and context menu options
      • Deployment and version control
        • Deployment & Version Control Dropdown (legacy)
      • Notes
    • Elements
      • General properties
      • General properties (Legacy)
      • Styling properties
      • Styling Properties (Legacy)
      • Responsive Properties
      • Responsive Properties (Legacy)
      • Conditional formatting
      • States
      • Page Element
        • Page Element (Legacy)
      • Visual Elements
      • Containers
      • Container Layout Types
      • Containers (Legacy)
      • Input Forms
      • Reusable Elements
      • Element Templates (legacy)
    • Workflows
    • Events
      • General events
      • Element events
      • Custom events
      • Recurring event
      • Database trigger event
    • Actions
      • Account
      • Navigation
      • Data (things)
      • Email
      • Element
      • Custom
    • Data
      • Data Sources
      • Operators and comparisons
      • Search
      • Privacy
    • Styles
    • API
      • The Bubble API
        • The Data API
          • Authentication
          • Data API endpoints
          • Data API requests
        • The Workflow API
      • The API Connector
        • Authentication
        • Adding calls
    • Bubble-made Plugins
      • AddtoAny Share Buttons
      • Airtable
      • API Connector
      • Blockspring
      • Box
      • Braintree
      • Bubble App Connector
      • Chart.js
      • Circle Music Player
      • Draggable Elements
      • Dropzone
      • Facebook
      • Fitbit
      • Full Calendar
      • Google
      • Google Analytics
      • Google Optimize
      • Google Places
      • Ionic Elements
      • iTunes
      • Slidebar Menu
      • LinkedIn
      • Localize Translation
      • Mixpanel
      • Mouse & Keyboard Interactions
      • Multiselect Dropdown
      • Progress Bar
      • Rich Text Editor
      • Rich Text Editor (Legacy)
      • Screenshotlayer
      • SelectPDF
      • Slack
      • Segment
      • Slick Slideshow
      • SQL Database Connector
      • Star Rating
      • Stripe
      • Tinder-like Element
      • Twitter
      • YouTube
      • Zapier
    • Application Settings
      • App plan
      • General
      • Domain / email
      • Languages
      • SEO / metatags
      • API
      • Collaboration
      • Sub-apps
      • Versions
  • Account & Marketplace
    • Account and billing
      • Pricing and plans
        • Plans and billing
        • Billing cycle
        • FAQ: Pricing and Workload
      • Account Management
      • Building Apps for Others
      • Selling on the Marketplace
      • Plans & Billing (legacy)
    • Official Bubble Certification
      • Hiring certified developers
    • Building Plugins
      • The Plugin Editor
      • General Settings
      • Updating to Plugin API v4
      • Adding API Connections
      • Building Elements
      • Building Actions
      • Loading Data
      • Publishing and versioning
      • Github Integration
    • Building Templates
    • Application and data ownership
    • Marketplace policies
    • Bug reports
  • Vulnerability Disclosure Policy
  • Beta features
    • About the Beta features section
    • Native mobile apps 🔒
      • Introduction
        • What is a native mobile app?
        • Native mobile vs. web development
        • Differences in native and web elements
        • Native mobile app terminology
      • Building
        • Views and navigation
        • Native mobile actions
        • Components and gestures
        • Device resources
          • Location services
          • Camera/photo library
      • Previewing
      • Publishing
Powered by GitBook
On this page

Was this helpful?

  1. User manual
  2. Workload
  3. Optimizing workload

Optimization checklist

Last updated 11 months ago

Was this helpful?

Workload optimization sometimes touches on advanced Bubble practices. We recommend this guide for developers who are fairly experienced with Bubble, and it's useful to read up relevant chapters in the User manual to prepare for the process.

Client-side versus server-side

Understanding the difference between server-side and client-side is key to evaluating processes for workload.

Article:


Data In this article series, we cover how to work with different types of data in Bubble:

Article series:


Workflows

  • Article series:

    • Article:

    • Article:


Logic

Workflows is a part of the Logic series user manual series.

  • Article series:

    • Article:

    • Article: Dynamic expressions are used both to set up conditions, and are highly useful in different actions that you may want to add to your workflows.

    • Article: Conditions are used to determine whether a workflow or action should run or not, by checking whether something is true.

    • Article series: Using workflows to let the user navigate between pages and page sections.

Optimization framework

The content of this article follows our workload optimization framework, which consists of the following points:

  1. Complexity: How complex is a given process?

  2. Repetition: How frequently is a given process repeated?

  3. Volume: How much data is returned by the database in a given process?

To learn more about the optimization framework, check out the article below.

Article:


In this article, we provide a quick guide to optimize areas of your app where optimization opportunities are common. Each expandable box below includes a link to a more detailed article for deeper insights.

Before diving into each point, please remember that while these tips can serve as a checklist for optimizing your app, they won’t cover every unique scenario. Think of them as examples of how to apply the optimization framework by assessing whether a process is complex, repeated, or returns a high volume of data.

Page load

Full article:

Go to page action

Page is loaded events will trigger every time the Go to page action is used, even if the user remains on the same page, and it doesn't technically refresh.

Solutions:

  • Repetition: remove Page is loaded events, or replace them by another event that doesn't repeat as often.

  • Repetition: use conditions to ensure Go to page only runs once.

Loading data on page load

Loading data and/or performing searches on page load means that they are likely to be performed frequently.

  • Repetition: instead of on page load, load data later (such as requiring a ).

  • Repetition: to stop invisible elements from loading data.

  • Repetition/volume/complexity: avoid .

  • Volume: set up your database in a way that returns less data

Page load workflows

It can be useful to run workflows as soon as the page loads, but keep in mind that anything that happens on page load is repetitive.

  • Look for ways to make page load workflows lightweight

    • Complexity: reduce the number of actions.

    • Complexity: simplify dynamic expressions.

    • Complexity: Avoid .

    • Volume: avoid searches that return a .

  • Repetition: consider whether a workflow needs to run on every page load.

  • Repetition: check whether the Go to page action forces a workflow to run more often than you anticipated.

Redirects

Redirecting users to a different page is common in cases such as when the user is not logged in. Redirection can happen server-side (before the first page is loaded), or client-side (after the first page is loaded).

Performing redirects server-side means that no workload is spent sending the page HTML before the user is redirected.

  • Complexity: keep redirection events as straightforward as possible, such as using User is logged out with no conditions. When Bubble doesn't need to check anything on the page, it can redirect the user immediately instead of .

Data aggregation

Many apps aggregate data in different ways (such as counting or calculating a sum or average). This is often done through a data source like Do a search for in combination with an operator like :count, :sum, or :average.

  • Repetition: considering calculating the numbers and storing them somewhere, instead of redoing the calculation every time they are displayed.

  • Repetition: consider not showing data until the user asks for it through interaction such as a button click.

  • Repetition: use conditions to avoid querying the data until an element is visible.

  • Complexity: set up the dynamic expression with as few sub-expressions as possible, and avoiding nested searches.

Searches

Searching for data is on its own not an especially heavy database operation, but we can use the optimization framework to determine whether a search spends a more significant amount than is necessary.

  • Complexity: avoid nested searches.

    • In repeating groups where each row contains a second search.

    • In search expressions, where a constraint or field contains a second search.

  • Complexity: avoid advanced filters.

    • Advanced filters (using the :filtered and :advanced operators) can substantially increase the WU needed to complete the query.

  • Volume: be mindful of structured and unstructured data.

    • Structured data is short, to-the-point data like names, phone numbers and emails.

    • Unstructured data can be long and "heavy", like blog posts, articles and product descriptions.

    • More text means more data to download, which translates into spending more WU.

  • Repetition: Be mindful of how often a search query is repeated

    • Searches on page load are naturally loading every time the page loads

    • Search results ; you don't need to perform another query for updated results.

    • Identical searches on the same page are only queried once, but queries in workflows are performed each time the workflow is executed. Consider using search results that have already been loaded when possible.

Full article:

Workflows and actions

Full article:

Number of actions

Each action that interacts with the server may add some WU to the calculation. Additionally, more actions can increase the total size of your app’s code. While this doesn’t affect WU consumption, it can lead to slower page load performance.

  • Complexity: look for ways to reduce the number of actions.

Workflow complexity

Complexity: look for dynamic expressions that are more complex than they need to.

  • Containing nested searches or advanced filters.

Workflow frequency

Even a low-impact workflow can spend considerable amounts of workload if it is repeated frequently.

  • Repetition: be mindful of using events like Page is loaded, Do every X seconds and potentially Do when condition is true, especially when they contain database operations such as searching or changing data.

  • Repetition: for particularly resource-heavy operations, find ways to encourage users to run them less frequently.

Working with lists

Working with lists, such as Make changes to a list of things and Delete a list of things are of course sometimes necessary. Still, keep in mind that it manipulating a list of things consumes more workload than a single thing.

  • Volume/repetition: avoid making frequent changes to a list of things.

  • Repetition: consider using instead of and when possible.

Backend workflows and API

Schedule API workflow on a list vs recursive workflows

These two methods of performing bulk operations can often produce the same outcome, while one consumes a lot of more WU than the other.

  • Repetition: using recursive workflows forces Bubble to re-schedule the workflow a lot of times, whereas Schedule API workflow on a list will schedule all the workflows in one operation. In other words, Schedule API workflow on a list spends less WU and is the recommended method from a WU perspective.

Bulk operations

Bulk operations are sometimes necessary, but are among the most WU-intensive tasks you can give the server.

  • Repetition: be mindful of how often you run a bulk operation. Optimally, they should be rare.

  • Repetition: Smaller bulk operations can sometimes be more efficiently handled by Make changes to a list of things, rather than Schedule API workflow on a list/recursive workflows.

  • Complexity/repetition: optimize bulk processes to not do more work than they absolutely need to.

    • Look for actions that could be repeated just once (such as on the last cycle, as opposed to on every cycle)

    • Pass lists as parameters, instead of performing the search query in every workflow

    • Set up conditions to be as lightweight as possible. For example, a condition that includes Do a search for may consume an unnecessary amount of WU

Database trigger events

The database trigger event is a powerful feature for ensuring database integrity, but since they can trigger frequently, they can also potentially consume a significant amount of WU.

  • Repetition: set up database triggers with conditions that ensures it doesn't trigger too frequently.

  • Complexity: ensure that a database trigger event and its actions and conditions don't perform complex queries such as searches with :filtered and :advanced operators, and nested searches.

  • Repetition: sometimes, database trigger events can be combined into one. This lets you perform the condition on the event only once, and may also make the actions inside more lightweight.

API authentication

API workflows and Data API endpoints that don't require authentication can be repeatedly accessed.

  • Repetition: As a general rule, inbound API requests to your app should require authentication, to avoid anyone simply calling them repeatedly.

  • Volume: avoid sending more data than you need via the Data API by setting up privacy rules and protect fields that should not be returned by the database.

Full article:

Server-side vs client-side processing
Data
Workflows
Events
Actions
Logic
The frontend and backend
Dynamic expressions
Conditions
Navigation
Workload optimization framework
Optimizing page load
Searches
Workflows and actions
Backend workflows