Optimizing your Bubble App Part 2
While Bubble is a powerful app development platform, on par with integrated development environments, workflows, and programming languages used by the best programmers in the business, it still functions within the bounds of what is computationally possible.
This means that your storage space is not infinite, and your processing power is not limitless. Thus, you as a no-code developer will still need to design your app such that you can most optimally use the limited resources you have at hand to provide an efficient and timely service to your end users.
We already discussed some of the more basic tenets of optimizing your Bubble app in a previous article. There, we discussed how Bubble loads pages and how you can take advantage of that process to design your pages to load more quickly. We also discussed some general tips on how to improve your app’s resource consumption such as keeping pages lightweight, using efficient search and filter methods, and planning out your web pages.
If you are already done with that advice or find that your app is still slow even after those fixes, keep reading for more no-code web development support on Bubble app optimization. Here we’ll discuss how to efficiently use the limited storage Bubble provides in accordance with your payment plan, and how to optimize your queries even further.
In Bubble, “capacity” refers to your app’s usage of server space. Any actions that your app takes such as processing user input, retrieving data, or calling certain workflows count towards your capacity. This all means that your capacity is going to depend on how large your user base is, and the kind of actions that they’ll be taking on your app.
Bubble measures capacity as ‘units’ that are a weighted measure of resource use. You won’t need to know too much about this; however, as it’s highly technical and it also changes over time. The important point to note is that one of Bubble’s goals is to make each unit of capacity used as performant as it can be for you and your users.
Your allocation of capacity depends on your app’s pricing tier. At the lowest levels, you will have “Basic” capacity, meaning you’ll be sharing resources with other apps of the same tier. At the “Professional” and “Production” tiers, Bubble will reserve units of system resources for your app only. When you exceed the capacity allotted to you, your app will have its resource use limited, causing your app to take noticeably more time in fulfilling your users’ requests.
You should also take note that user behavior plays a part in how resources are allocated. A single user running a lot of requests can potentially hog resources from other resources sending less requests. Similarly, a complex database or query system can also hog resources away from other tasks, possibly damaging your user experience.
You can monitor your capacity usage using the Logs menu in the navigation sidebar. The charts in the menu show how long the app have been at maximum capacity, how much capacity the app uses relative to the maximum capacity limit, and a breakdown of how much capacity is used by each part of the app.
You can also monitor your capacity usage in the editor’s Capacity Usage section. The charts included in the section measure the page loading times gathered over the latest page loads by your users over the last 60 minutes.
Of primary interest in the Capacity Usage section’s charts are the render complete, data loaded, and count of data items required.
The render complete readout will give you an idea of how long it takes to load your entire page, including visual elements.
The data loaded readout gives you an idea of how long it takes your page to load with its dynamic data elements; essentially, it is the rendering complete time plus however long it takes to load your data.
Finally, there is a count of data items required which tracks how many data elements are loaded in the data loaded time, thus giving you an idea of the total data needed to load the page.
Unlike page performance, there are fewer general ‘tips’ for handling capacity. While you can generally up your performance by carefully designing your pages to be performant by reducing usage of repeating groups and particularly heavy elements, your capacity will depend on everything from the nature of your app to the size and behavior of your user base.
At least with capacity, though, you can always just upgrade to a higher capacity tier if you think the size of your user base justifies a greater allocation of computing resources. Generally, since capacity scales with user base and your financial resources should similarly scale with user base, if you’re only a small app you can rest safely in the knowledge that you’ll be able to seamlessly catch your capacity up with your users as needed.
You can also just redesign your database and queries to be less resource-intensive and lighten the use of data elements on your pages if you think you need more capacity.
One other way to improve your performance and capacity is to make use of Dedicated Instances. Bubble offers the use of Dedicated Instances, or a set of system resources and infrastructure that can be dedicated solely to your app. You’ll need to contact Bubble via their sales team to avail of it, and it offers the following possible benefits:
- Dedicated Instances can significantly lower latency for some of your users by being placed closer to them, improving the performance of large static assets.
- Dedicated Instances handle heavy data operations substantially faster.
- Dedicated Instances can make your app more stable and help you to test new features. You can deploy new features on the main Bubble cluster before upgrading the Dedicated Instance, and it also safeguards you against instability from newer versions of Bubble.
In case you need more help optimizing your app and you find that you’ve already exhausted the tips we’ve laid out for you here, know that Bubblehelpers also provides technical assistance for Bubble app development. Avail of no-code web support at our page here.