# Performance Q&A guide

**URL:** <https://forum.bubble.io/t/performance-q-a-guide/12140>\
**Category:** Tips\
**Created:** [April 4, 2017, 12:01pm UTC](https://forum.bubble.io/t/performance-q-a-guide/12140 "2017-04-04T12:01:44Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![josh](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/josh/32/207556_2.png) [@josh](https://forum.bubble.io/u/josh)\
**Post date:** [May 8, 2017, 5:42pm UTC](https://forum.bubble.io/t/performance-q-a-guide/12140/43 "2017-05-08T17:42:35Z")

</div>

Couple quick updates:

-Autobinding: haven’t gotten a chance to debug this further yet, sorry. Will update when I do.

-@blueback09 There’s two solutions here. One is to manually create a field on the Parent thing with the contents of something, like you suggest. If the Something field is the main thing you’re using to retrieve Parents by, that’s probably the fastest. The other thing you can do is if you can narrow the set of Parents you might want to search down using fields stored on the Parent, you can then use an advanced filter to filter out Parents whose something doesn’t contain what you are looking for. This is only going to be efficient if you can shrink the number of Parents in the initial search to a number that’s not too big, since we can’t apply advanced filters without loading all of the data.

@johncottongim – it’s generally better to update a bunch of fields at once rather than lots of small updates in terms of write speed and on-screen performance. Re: page size, unless you have hundreds of workflows, visual elements generally contribute much more to total page size than actions / events, so I wouldn’t worry about optimizing that.

@florent.bocquelet – we’re not doing anything smart right now re: optimizing booleans… we’ll still do the search. That may change in the future, though, since that’s a common optimization in programming. Yes, putting it in a seperate conditional will get around this limitation for now.

@nathan.d.stevens – The main factor in long scripting times is total number of elements (and how complex / how many properties) elements have. Repeating groups are often a culprit in pushing up the total number of elements: a repeating group with 10 cells each containing two elements is faster than having 20 seperate elements, but it’s still much slower than 3 elements. You can control the timing via keeping things invisible; we generally don’t render elements until they become visible, so if you have most of your page in an invisible group, then show it a half-second after page load, you shouldn’t have the 5000 ms cost until that half-second delay, and in the interim you can display a lightweight message. (That said, the logic about when elements get rendered is a little complicated, so YMMV; test this empirically on your own app…)

---

<div class="post-metadata">

**Author:** ![josh](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/josh/32/207556_2.png) [@josh](https://forum.bubble.io/u/josh)\
**Post date:** [May 15, 2017, 10:47pm UTC](https://forum.bubble.io/t/performance-q-a-guide/12140/44 "2017-05-15T22:47:09Z")

</div>

Hey @bubble5, @kahan.jonathan, @gurun, @florent.bocquelet – we just deployed some fixes that should make auto-binding more reliable. Let me know if you see a difference or if it still feels buggy.

---

<div class="post-metadata">

**Author:** ![gf\_wolfer](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/gf_wolfer/32/262456_2.png) [@gf\_wolfer](https://forum.bubble.io/u/gf_wolfer)\
**Post date:** [May 19, 2017, 11:53pm UTC](https://forum.bubble.io/t/performance-q-a-guide/12140/45 "2017-05-19T23:53:33Z")

</div>

@josh obviously it is not ideal to store a list of things on a piece of data, if the list can be in the thousands and can be avoided. But occasionally it seems necessary, like in the case of a Twitter clone. To track Likes on a tweet, I would either have to assign a list of Users to a Tweet OR to assign a List of Tweets (liked) to a User. Either way the lists could potentially be in the thousands.

So in this type of scenario, to make sure a User and a Tweet load optimally, is it better to save a List of Texts (unique IDs), than to save a List of the Data Type?

Or is there a better way to structure this data to store a large list to a piece of Data?  
Such as creating a Like as a data type and assigning the User and the Tweet to it?

---

<div class="post-metadata">

**Author:** ![ernie](https://avatars.discourse-cdn.com/v4/letter/e/eb8c5e/32.png) [@ernie](https://forum.bubble.io/u/ernie)\
**Post date:** [June 4, 2017, 2:04pm UTC](https://forum.bubble.io/t/performance-q-a-guide/12140/46 "2017-06-04T14:04:19Z")

</div>

> [@josh](#):
>
> That said, in certain situations, you might want to force data to load by having an element be transparent or covered up rather than actually invisible. (We do render covered-up elements because it’s too hard to tell whether or not the user can see them).

What’s the difference between 1) having an _invisible_ element whose data source is referenced (thus start loading data) and 2) having a _transparent / covered-up_ element? As far as I understand, both invisible and transparent elements would fetch data – then what are certain situations transparent elements are more suitable than invisible elements?

---

<div class="post-metadata">

**Author:** ![ernie](https://avatars.discourse-cdn.com/v4/letter/e/eb8c5e/32.png) [@ernie](https://forum.bubble.io/u/ernie)\
**Post date:** [June 4, 2017, 2:34pm UTC](https://forum.bubble.io/t/performance-q-a-guide/12140/47 "2017-06-04T14:34:36Z")

</div>

> [@josh](#):
>
> If you have a repeating group inside a repeating group, and both have a lot of visible cells, that can get very slow.

I have the following structure:

- A repeating group (6 cells with infinite scroll)
  - A repeating group (fixed number 7 cells – 2 elements in each cell)
  - A repeating group (fixed number 10 cells – 2 elements in each cell)
  - A repeating group (fixed number 3 cells – 2 elements in each cell)

All nested repeating groups don’t do a search – they simply reference the parent repeating group’s search. Is this equivalent to:

- A repeating group
  - 7 groups (2 elements in each group)
  - 10 groups (2 elements in each group)
  - 3 groups (2 elements in each group)

Would either one be any faster?  
When you said “lots of visible cells can get very slow”, how many cells?

---

<div class="post-metadata">

**Author:** ![kramwe](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/kramwe/32/10102_2.png) [@kramwe](https://forum.bubble.io/u/kramwe)\
**Post date:** [June 10, 2017, 10:35am UTC](https://forum.bubble.io/t/performance-q-a-guide/12140/48 "2017-06-10T10:35:24Z")

</div>

1. Can you please elaborate on how indexes are designed? Are these focused on the unique PK fields or more specific to how I’m doing search for queries in my app?

2. Is the purpose of field type “list of things” performance? How does this compare to adding the grandparent id to the parent table thereby circumventing a nested search?

Which method is better: [Speed is an issue](http://forum.bubble.io/t/speed-is-an-issue/13956/5) vs. [Speed is an issue](http://forum.bubble.io/t/speed-is-an-issue/13956/6)?

---

<div class="post-metadata">

**Author:** ![kramwe](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/kramwe/32/10102_2.png) [@kramwe](https://forum.bubble.io/u/kramwe)\
**Post date:** [June 15, 2017, 4:24pm UTC](https://forum.bubble.io/t/performance-q-a-guide/12140/49 "2017-06-15T16:24:11Z")

</div>

Few more questions:

1. Is there any performance difference between putting a condition on a workflow v. putting that same condition on a single action within a workflow:slight\_smile:

2. I know, as you’ve previously said, that there is a purposeful delay put on a “Scheduling a Workflow on a List”.  
Today this appears to be 5sec or longer. We’re using “Schedule a Workflow on a List” that hits another API endpoint to add multi-row API responses on row at a time into our database. My question is: If we limited the number of fields or the quantity of the data that is written to the database, would this improve performance? All the fields are \<300bits in size.

---

<div class="post-metadata">

**Author:** ![vincent56](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/vincent56/32/16009_2.png) [@vincent56](https://forum.bubble.io/u/vincent56)\
**Post date:** [June 15, 2017, 7:42pm UTC](https://forum.bubble.io/t/performance-q-a-guide/12140/50 "2017-06-15T19:42:09Z")

</div>

When en element has to refer to a parent groups thing, does this affect performance? Some of my pages have groups up to five levels deep referencing a groups Thing.

This cannot be changed to the page’s Thing because the user clicks a Thing from a list and a new group is shown, not a new page (where I can transfer the thing to)

---

<div class="post-metadata">

**Author:** ![vincent56](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/vincent56/32/16009_2.png) [@vincent56](https://forum.bubble.io/u/vincent56)\
**Post date:** [June 15, 2017, 8:16pm UTC](https://forum.bubble.io/t/performance-q-a-guide/12140/51 "2017-06-15T20:16:28Z")

</div>

> [@josh](#):
>
> @florent.bocquelet, re:
> 
> So what you are saying is that it is actually more efficient to have a “Company” field in each invoice and then do a “search for…” on the invoices with a constrain on the company, rather than having a “Invoices” field in “Company” that is a list of invocies, and directly display this list without passing by a search ?  
> Intuitively, I would have think the opposite (using a list you don’t have to perform a search on all invoices, you already know them)
> 
> You’re not wrong. To be more precise, using a list is faster, but having the company field is more scalable. If your list is short – you know you’ll never have more than 20 - 30 invoices per company, for instance – then yes, using a list will load a little faster. However, using a company field isn’t that much slower, and it’ll still be fast no matter how many invoices per company you have, whereas the list will start slowing things down once the total number of invoices goes beyond the number you actually want to display at any one time.

So where is the dropoff for the number of items? And what is faster:

Do a search for Invoices with Company being X, then having a couple of other constraints (filter, sort)

Refer to Company’s Invoices with a :filtered action to add the constraints?

---

<div class="post-metadata">

**Author:** ![josh](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/josh/32/207556_2.png) [@josh](https://forum.bubble.io/u/josh)\
**Post date:** [June 15, 2017, 9:21pm UTC](https://forum.bubble.io/t/performance-q-a-guide/12140/52 "2017-06-15T21:21:14Z")

</div>

> [@gf\_wolfer](#):
>
> Or is there a better way to structure this data to store a large list to a piece of Data?  
> Such as creating a Like as a data type and assigning the User and the Tweet to it?

Yes, currently this is the most scalable way to build this. We eventually plan to do this automatically behind the scenes (ie, have it feel like a list, but actually be a separate table in the database) but that might not be for a while, so your suggesting of having a Like datatype is a good work around.

> [@ernie](#):
>
> As far as I understand, both invisible and transparent elements would fetch data

Invisible elements only fetch data if you force them to by referencing their data source. Transparent elements will fetch data regardless, so if you don’t want to reference their datasource from a visible element, but want them to show instantly with their data fully loaded, that’s why you might want to do that. That said, don’t go crazy with that technique – otherwise you’ll be paying the cost of loading all the page’s data upfront instead of just when you need it.

> [@ernie](#):
>
> Could either one be any faster?  
> When you said “lots of visible cells can get very slow”, how many cells?

This is the kind of thing that’s easiest to just test empirically – depends on a lot of factors. I’m trying to give general guidance but at the end of the day, a lot of things are trade-offs and you should see what works on your app.

> [@kramwe](#):
>
> Can you please elaborate on how indexes are designed? Are these focused on the unique PK fields or more specific to how I’m doing search for queries in my app?

Specific to searches – we monitor for searches that take a long time to return their first result (generally indicative of a situation where indexing can help), and build indexes to support that particular search.

> [@kramwe](#):
>
> Is the purpose of field type “list of things” performance? How does this compare to adding the grandparent id to the parent table thereby circumventing a nested search?

Primary purpose is to make it easy for users to create a list – it’s cumbersome to have to work backwards via a Search. See above re: future plans to make this more scalable via switching to having a relationship table vs storing it as an array on the record itself. Not sure I follow how using a list is an alternative to the technique of storing a grandparent reference directly on the object. (There shouldn’t be a performance difference between storing the unique id in a text field and just storing a reference to the object, since behind-the-scenes, a direct reference is just us storing the id as text)

> [@kramwe](#):
>
> Is there any performance difference between putting a condition on a workflow v. putting that same condition on a single action within a workflow:slight\_smile:

Well, skipping an entire workflow is faster than skipping just one action…

> [@kramwe](#):
>
> I know, as you’ve previously said, that there is a purposeful delay put on a “Scheduling a Workflow on a List”.  
> Today this appears to be 5sec or longer. We’re using “Schedule a Workflow on a List” that hits another API endpoint to add multi-row API responses on row at a time into our database. My question is: If we limited the number of fields or the quantity of the data that is written to the database, would this improve performance? All the fields are \<300bits in size.

The main variable is number of items in the list, not the size of each item

> [@vincent56](#):
>
> When en element has to refer to a parent groups thing, does this affect performance? Some of my pages have groups up to five levels deep referencing a groups Thing.

Referencing a parent group’s thing should be a pretty fast operation[quote=“vincent56, post:51, topic:12140”]  
So where is the dropoff for the number of items? And what is faster:

Do a search for Invoices with Company being X, then having a couple of other constraints (filter, sort)

Refer to Company’s Invoices with a :filtered action to add the constraints?  
[/quote]

Re: drop-off, test empirically in the context of your app: varies based on item size, what queries you do, etc.

If you can put a filter in the original search, that’s almost always at least as fast or faster. We’re working on some improvements to be smarter about :filtered messages, but those improvements basically boil down to executing the filter as part of the original search if we can, so best case it will become just as fast.

---

<div class="post-metadata">

**Author:** ![collegefund.me](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/collegefund.me/32/11688_2.png) [@collegefund.me](https://forum.bubble.io/u/collegefund.me)\
**Post date:** [June 28, 2017, 1:25am UTC](https://forum.bubble.io/t/performance-q-a-guide/12140/53 "2017-06-28T01:25:29Z")

</div>

@josh - regarding your comments quoted below, how does this principle apply to popups? Let’s say I have a reusable element that is a navigation bar loaded on a page. This reusable navigation bar includes 3 popups (i.e. Edit Profile, Update Profile, Update Profile Photo, etc.). Are these popups loaded each time a Page containing the reusable navigation bar loaded, or are the popups loaded only when activated (i.e. when the Workflow is activated which shows a particular popup)?

Thanks!

> [@josh](#):
>
> When you navigate to a page, we have to load all the elements on the page, and all the custom definitions needed for custom elements on that page. `But, we don't need to load any other pages in the app, and we don't need to load custom definitions that aren't used on that page, so we don't send that data.`

---

<div class="post-metadata">

**Author:** ![Pflegetiger](https://avatars.discourse-cdn.com/v4/letter/p/c6cbf5/32.png) [@Pflegetiger](https://forum.bubble.io/u/Pflegetiger)\
**Post date:** [July 3, 2017, 9:52am UTC](https://forum.bubble.io/t/performance-q-a-guide/12140/54 "2017-07-03T09:52:22Z")

</div>

Hello Bubble Community,

this is a great topic.

We have been using bubble for quite some time and really like it, but unfortunately speed is a big issue for us.

We have been trying to solve this by taking some steps on our content side, e.g. compressing pictures and we also switched to a dedicated server plan.

However, we are still not happy with the speed of our site [www.pflegetiger.de](http://www.pflegetiger.de)

We would be more than happy if some people have recommendations for us.

---

<div class="post-metadata">

**Author:** ![robert](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/robert/32/149181_2.png) [@robert](https://forum.bubble.io/u/robert)\
**Post date:** [July 3, 2017, 10:41am UTC](https://forum.bubble.io/t/performance-q-a-guide/12140/55 "2017-07-03T10:41:23Z")

</div>

The site was fairly fast, as I poked around it. Which specific pages or elements do you think are slow?

---

<div class="post-metadata">

**Author:** ![Pflegetiger](https://avatars.discourse-cdn.com/v4/letter/p/c6cbf5/32.png) [@Pflegetiger](https://forum.bubble.io/u/Pflegetiger)\
**Post date:** [July 3, 2017, 1:37pm UTC](https://forum.bubble.io/t/performance-q-a-guide/12140/56 "2017-07-03T13:37:36Z")

</div>

Hi Robert,

especially our index page [www.pflegetiger.de](http://www.pflegetiger.de) and jobs page [www.pflegetiger.de/jobs](http://www.pflegetiger.de/jobs) are important for us.

Different speed test show load times between 12 and 14 seconds.

This is an issue for Adwords (lower quality score, high bounce rate from clicks to visitors) and for the page experience, which also leads to a high bounce rate.

---

<div class="post-metadata">

**Author:** ![robert](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/robert/32/149181_2.png) [@robert](https://forum.bubble.io/u/robert)\
**Post date:** [July 3, 2017, 2:55pm UTC](https://forum.bubble.io/t/performance-q-a-guide/12140/57 "2017-07-03T14:55:33Z")

</div>

both pages loaded in under 3 seconds for me.

---

<div class="post-metadata">

**Author:** ![andrewgassen](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/andrewgassen/32/44248_2.png) [@andrewgassen](https://forum.bubble.io/u/andrewgassen)\
**Post date:** [July 3, 2017, 3:52pm UTC](https://forum.bubble.io/t/performance-q-a-guide/12140/58 "2017-07-03T15:52:46Z")

</div>

I’m getting similar results to you. While 3 seconds is still a long time, it’s nowhere near the 12 and 14 mentioned by @Pflegetiger. I’m in Virginia near the AWS east data center, so I wonder if this makes things faster for me?

---

<div class="post-metadata">

**Author:** ![vincent56](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/vincent56/32/16009_2.png) [@vincent56](https://forum.bubble.io/u/vincent56)\
**Post date:** [July 3, 2017, 4:10pm UTC](https://forum.bubble.io/t/performance-q-a-guide/12140/59 "2017-07-03T16:10:09Z")

</div>

Took 4 seconds for me, so unless stuff needs to load in the back that I cant see it’s about the same for me. I’m in the Netherlands.

---

<div class="post-metadata">

**Author:** ![robert](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/robert/32/149181_2.png) [@robert](https://forum.bubble.io/u/robert)\
**Post date:** [July 3, 2017, 4:12pm UTC](https://forum.bubble.io/t/performance-q-a-guide/12140/60 "2017-07-03T16:12:25Z")

</div>

Is there a tool that can pinpoint the elements or actions that are the bottlenecks?

---

<div class="post-metadata">

**Author:** ![robert](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/robert/32/149181_2.png) [@robert](https://forum.bubble.io/u/robert)\
**Post date:** [July 3, 2017, 4:20pm UTC](https://forum.bubble.io/t/performance-q-a-guide/12140/61 "2017-07-03T16:20:22Z")

</div>

I’m consistently getting under 4 seconds, and sometimes under 3.

You could compress your images. That background image is 1.2MB…can get that down to 350k or less with minimal loss.

---

<div class="post-metadata">

**Author:** ![Pflegetiger](https://avatars.discourse-cdn.com/v4/letter/p/c6cbf5/32.png) [@Pflegetiger](https://forum.bubble.io/u/Pflegetiger)\
**Post date:** [July 4, 2017, 8:34am UTC](https://forum.bubble.io/t/performance-q-a-guide/12140/62 "2017-07-04T08:34:01Z")

</div>

Thanks for checking it out. On my device to load time varies between 4-9 seconds depending on the internet speed (glas fiber at work and still quite fast internet at home)

This is what different tests show us:  
[https://www.webpagetest.org/result/170703\_DE\_QRT/](https://www.webpagetest.org/result/170703_DE_QRT/)  
[https://gtmetrix.com/reports/www.pflegetiger.de/EyIwdtCg](https://gtmetrix.com/reports/www.pflegetiger.de/EyIwdtCg)  
[https://developers.google.com/speed/pagespeed/insights/?hl=de&url=www.pflegetiger.de&tab=mobile](https://developers.google.com/speed/pagespeed/insights/?hl=de&url=www.pflegetiger.de&tab=mobile)

Google Analytics points out that we have a latency problem, i.e. we are receiving more clicks on campaigns than we are receiving visitors.

Besides the other tests, the Google results matter a lot for us, as page load time influences the quality score of the page.

[Previous page](https://forum.bubble.io/t/performance-q-a-guide/12140.md?page=2)

[Next page](https://forum.bubble.io/t/performance-q-a-guide/12140.md?page=4)
