Optimization Best Practices and Official Materials

Hello fellow Bubblers,

Considering how important “Optimization” (whatever that truly means) is right now for most Bubblers, I am very surprised not to find any “official” materials: eg. dedicated pages, video tutorials, best practices. I do not even think “Optimization” is an official category or sub-category / tag on the forum…
I am building a website right now, and I am totally lost about what I should do. Are Satellite databases still more efficient with the new WU calculation? Is it more efficient to host the database elsewhere considering the cost of APIs calls? Are using URL parameters “good” or “bad” (again in Bubble’s own terms vs WU)? Etc.

Using the Forum before the announcement a month ago does not help because what was “efficient” before might not be “efficient” now.

So my question to you all: where are those informations? Have I missed some important announcements about where I can find those critical information about Optimization best practices “officially” or through the community (ideally both…)?

1 Like

Whilst I agree that the amount of useful advice on this topic is woeful (including from Bubble themselves), the number of posts in this forum over the past few weeks from people panicking and speculating about what and how to optimize their apps is equally perplexing to me.

It’s really not that hard, and doesn’t take too long, to test these things for yourself - then at least you’ll know for a fact what is, and isn’t, the most efficient way to do certain things, rather than relying on other people’s advice (much of which I’ve read over the past few week, including things from Bubble themselves, is simply factually incorrect or not efficient at all).

I’ve spent the last week or so doing just that - testing various ways of storing and loading data for a number of fairly common situations, so I know exactly how I need to optimize my apps for the future and, in some cases the differences between the least, and most efficient ways, in WU costs are enormous (up to a factor of 20).

I may choose to publish my findings here in the forum at some point for the benefit of others - but honestly, the same tests can (and should) be conducted by anyone, and the results I got are specific to the tests I conducted and data I used, and may be different with different data and uses etc.

In any case, I’ll try to answer your questions, although they are very vague and the answers will, as always, be dependant on many many factors which you haven’t shared, so they can only be generalisations.

Are Satellite databases still more efficient with the new WU calculation?

It depends on exactly what you mean by ‘more efficient’, and in where and how you’re intending to load the various data. But, in most cases, I would say ‘yes’ they are ‘still’ if not ‘more’ relevant now than ever before (until that is Bubble allow the option to only return the required fields from search queries, but I don’t think that will be happening any time soon).

Is it more efficient to host the database elsewhere considering the cost of APIs calls?

I haven’t tested this yet myself (it will be one of the next things I test) - but my instinct tells me ‘no’ it won’t, just based on what I’ve seen so far in my own testing. But again, it depends on a whole range of factors, and I could be wrong about that. There is already some discussion elsewhere on the forum about this, but I haven’t seen any evidence put forward either way.

But, as I’ve said before - test it for yourself if you really want to know right now.

Are using URL parameters “good” or “bad” (again in Bubble’s own terms vs WU)?

I’m not too sure what you mean by this question? Using URL parameters as opposed to what? Why would you think using URL parameters have anything to do with WU (unless you’re using them to pull data from the database, which you probably are, but that’s not specific to URL parameters). It IS better to use unique ID’s in URL parameters (as that way you can get the database item directly, rather than searching for it, which IS less costly in WU), rather than using a search (and unlike, URL Path Parameters, which can use the unique ID or the Slug to retrieve a thing from the database, query parameters can only use the unique ID).

So my question to you all: where are those informations? Have I missed some important announcements about where I can find those critical information about Optimization best practices “officially” or through the community (ideally both…)?

Mostly, you’ll have to find it for yourself - as the specifics of your app and how it’s built will largely dictate the most efficient way to do things (and besides, why trust someone on the forum when you can test these things for yourself).

5 Likes

Wow thanks a lot for the great reply! I think in general you are right that it’s probably not that difficult for users to test and search through the answers on the forum. But let’s say that every user has to spend 10 hours to really understand the logic behind the optimizations with test and learn, x 1000 users doing so. That is 10 000 hours for this. VS Bubble spending 100 hours of work to create a dedicated page and materials and the “source of truth” that we could then all consult and could be regularly updated…

2 Likes

Based on some of the advice Bubble have given so far, I’m not convinced they know any more than anyone else in terms of what is and isn’t efficient in WU costs…

Bubble never had solid “best practices” materials in terms of their quantity. Everything Bubble community knows is a result of making experiments joined with info from Bubble’s official manual and forum (even performance section of official manual is copied from the forum post of one of Bubble devs).

So I wouldn’t expect a lot of info from Bubbles side (btw, recently they’ve created a new blog post with few tips on optimisation).

The best way is to test everything by yourself and read the forum and twitter (there are a lot of OG Bubble devs who are almost not active on Bubble forum but share a lot of useful info on Twitter).
For example, using satellite data types causes additional WU consumption by CRUDs operations. In the same time satellite DTs give you opportunity to reduce search WU consumption (while you don’t need to return a lot of attributes you don’t really need).

P.S. You white PFP drives me crazy, I thought I had some connection issues and forum doesn’t load PFPs :slight_smile:

@adamhholmes

So if I have a repeating group that displays User’s-listofthings.
And I want to perform calculations based on fields of those list of things in the repeating group, eg do a product sum of two fields in the list of things. if I reference repeatinggroup_listofthings_field is that going to cost me WU given the data is already loaded into the repeatingGroup? in theory it shouldn’t.

If I perform the same calculations using the search for things, then that will cost me WU? because Bubble is re-fetching the data?

haha I am scared this is the reason why we do not have all those official guidelines indeed… Maybe the bubble team is reading the forum to learn how to optimize :slight_smile:

Don’t do searches for things inside RGs.

what do you mean?
If i have a repeating group of fruits that’s already loaded.
isn’t referencing repeatinggroup’s list fruits more efficient than do a new search for fruits?

Yes of course it is (that’s what I’m saying).

Although in truth you can do as many ‘searches’ as you want once the data is already on the page - i t won’t make any difference, as the ‘search’ won’t be performed if the data is already there (in most cases anyway).

1 Like

If you have two RGs with exactly the same data source - Bubble is smart enough to perform only 1 search. You can easily check it Chrome DevTools (network tab).

1 Like

Ok cool, that make sense
thanks.