Increasing my paid plan would increase my API workflows speed?

Hi, I have not launched my app yet so my app’s capacity is not being consumed by users.

However, I do have some very complex API workflows in the backend. They usually take around 3 minutes to complete.

Imagine that I already have built this workflows optimized por speed, with the best practices.

I would like to know if getting a higher paid plan would increase the completion speed of this workflows? Remember that they take 3 minutes and I don’t have any users yet.

If anybody knows please let me know.

Thanks!

3 Likes

Hi,

I understand your point. Before building the app I ran some performance tests. Forget about updating the database if you need to have a few hundred records updated and you need it in seconds. Will not happen.

Having thousands of records in the database is just fine. Retrieving some of them is quick. Updating a few hundred is slow. Think in terms of 10 seconds per 100 records to update with api workflow (which is the fastes method I know of in bubble)

1 Like

Hi! Thanks for your answer.

So, if I increase my paid plan (pay more), this 10 seconds can become less?

Yes a bit more I think but still if you need real time database action on hundreds of records bubble is not a right fit.

1 Like

That’s very unfortunate. I hope bubble can improve this, it has taken a great amount of time and effort to build my app :pensive:

Higher plans only give you more capacity, not speed.

In other words, all plans have the same “speed” and workflow execution. Higher plans just allow more people/operations to occur at the same time.

You can pay $10,000/month and still get the same execution speed.

2 Likes

Very disappointing for people who want to build and scale complex apps in Bubble, for me even worse, cause I already took 6 months building it :pensive:. Thanks for sharing your knowledge.

@emmanuel it would be great to improve this! :pray:

1 Like

Maybe he can improve the speed by paralleling some parts of his workflow somehow?

We are looking into using an external database for the heaving computing queries. Or move away from bubble all together.

But as you said, time, a lot of time is already invested. And for most simple data things Bubble is great. Most apps will fall in this category. It yes, if Bubble can improve data speed and handling on par with the likes of Azure, AWS and Firebase, it is a very powerful tool. If only they can make it easy to build native mobile apps from scratch they would rule the world.

Probably that is hard, otherwise they would have done it already

3 Likes

@w.fly I got the impression that with more capacity you can also run larger blocks in backend api’s meaning you will loose some overhead. This adds up if you need to process thousands of records. But I can be wrong…

Changing to an external database means that you would have to modify all the workflows and conditionals that currently use information that is in your Bubble’s database?

I think that’s a save statement to make although we have not done any work on it yet. Just investigating so I am not qualified to tell you exactly what it would mean for your particular database setup. We have constructed our data such that we have the option to use an external database just for the large DB calculations and return a list of searched and filtered items that can be used in Bubble.

1 Like

Perhaps I can assist you in rewriting the workflows. pm me if interested, three minutes is huge, unless you’re processing 2,000+ records?

I’m available from Monday onwards

2 Likes

@nocodeventure of you can do 3600 changes in the Bubble database within 5 seconds you are my man. I am not able to and jet have to find anybody who can.

Could you characterize what these workflows are doing, and is the result of the workflow something the user needs to see immediately? Three minutes is a long time; hopefully it can be substantially shortened.

Not without getting time-outs of 10 seconds in between several hundred items. 3600 changes in 5 second seems ridicilous and there should be better ways.

No database will allow you to do it this fast unless you’re running a custom solution.

Happy to walk it through with you though sometime later should you be interested to talk as there might be ways to optimize your workflows.

3 Likes

@nocodeventure happy to discuss this further as I believe solving this helps all of us.

The thing is that databases like SQL have no issues with thousands of transactions per second.

It seems that Bubble limits this because the platform will be less stable.

I believe that when Bubble designs the backend such as AWS or Azure where you can do those thousand transactions without any issues as long as you pay for it we Bubblers would be over the moon. Then Bubble can easily scale even by non coders.

2 Likes

Dietitians create base meal plans in my app. Then they send their clients to my app and my app will adapt the base meal plans to the caloric requirements of each client (the food will be the same as in the base plan but the quantities are adapted to each client’s caloric requirement).

So for each client, all the food in the base meal plan is copied (usually they are +200 items (food and ingredients) copied and each item has more than 20 records to be modified, so yes, for each client I modify around +4000 records, that is why it takes so long).

Why do I copy all the items from the base plan and not just use the same items from the base plan and adapt the quantities in the front end without modifying the db for each client?

Because if dietitians modify their base plan, for example, if they change an apple for a carrot, then all the client plans that were generated using that base plan and that had an apple, would be modified and now have a carrot.

So, client meal plans that were already generated should remain the same for ever, no matter if the dietitian modify the base meal plan.

I am thinking that a solution might be to allow the dietitians to release new versions of their base meal plans.

So, if they would like to modify an item of the existing base meal plan they would have to generate a new version of it, so all the items would be copied (this would still take 3 minutes) but just once.

Then, for every client meal plan I would just make reference to the latest version of the base meal plan items, the adapted quantities I can set them up with a math formula in the front end, without touching the db.

What do you think about this possible solution? I will still have the 3 min process but only the dietitians will experience it when releasing new versions, not every client when generating their adapted meal plans. Do you think there is any other way that I can do this without the 3 minutes wait?

Hi, it’s hard to answer without seeing specifically how everything is set up (and to go into that level of work/detail, you may need to pay a Bubble expert to go through it with you).

But in general, database “normalization” principles say to avoid duplication and use relationships whenever possible (within reason). I would be thinking through:

  1. How can I keep each database entry as “light” as possible, meaning not loading an entry up with data that is duplicated elsewhere. Instead refer to duplicated info via relationships, so that each datatype is mostly composed of unique info. And as part of that, consider using joining tables, since the Bubble list field isn’t the best approach with large lists.

  2. How can I reduce the amount of work I’m asking Bubble to do? This not only speeds up processing time, but also saves you money if you start to get lots of users, since Bubble is priced according to processing capacity.

The other factor here is scale. If you don’t anticipate a lot of users, then a sub-optimal approach usually works just fine. But if your goal is to get thousands or tens of thousands of users, a sub-optimal approach can fall apart.

2 Likes

Thanks, everything makes sense! I’ll try what I have in mind and if it does not works I’ll try hiring someone. Thank you as well @nocodeventure, I’ll definitely let you know if anything