If i have 10,000 data, bubble is too slow, I noticed a big issue

i am creating app that has a function like Twitter.

i am having big issue.

I put 10,000 data in the database for testing.
I set the repeating group “do a serach for” with EXT vertical scrolling.
this setting, the display speed was very slow.

i think, The reason why the display is slow in this case is,
If i display RG without specifying a number,
Bubble trying to pick up all the data in the database.
this is the why display is slow.

so, i change it to “do a serach for” with Full list #item until 10.
when user scroll to bottom of page, I increase the numbers, #item until 20…#item until 30…
this setting, the display speed issue has been resolved.
Bubble trying to pick up only the first 10 in the database.

but now, i have big issue. the issue is,
The display is very slow when the user types in the search box and searches for an RG that is already displayed.

In order for the user to display the search results correctly, 10000 data must be searched, but
With this method, 10000 data are referenced, so the display is too slow and unusable.
If i refer only to the first 100 of 10000 data and let the user display the search results, the display speed will be satisfactory.

However, this method is not correct because it is not the search result of 10000 data, it is the search result of the first 100 data.

Does anyone know any good way?
how can i speed up the display when i has over 10,000 data in the database??

someboby know why Bubble forum’s display speed is so fast?

2 Likes

Instead of doing until #10

you’ll want to do either do a set number of rows 10 and use pagination or show more button to go to next page (your editor will need to have 10 rows in repeating group) OR extended scroll which acts as a full list but only loads what is in the users view and as they scroll it renders more.

However at scale you’re going to see this kinda slow still. The fastest way to do this is implementing agolia for near instant search even at scale(bubble has an option in settings)

1 Like

@chris.williamson1996
thanks for reply.

could you teach me what agolia is?
Is Bubble forum using agolia?

The Bubble forum uses discourse.org.

Do a scrolling RG and set the # of rows to a specific number. I think this is the most efficient.

However I think your slowness issue is either related to way you have the search set up, or you have really heavy data entries. 10,000 is not that many entries for Bubble. I have similar and have no issues with server side search speed.

PS if you want to explore Agolia as @chris.williamson1996 suggests, it’s covered in the Bubble documentation: Using Algolia - Bubble Docs

2 Likes

Bubble search for 100000+ records is near instant. The issue with bubble is retrieving a large amount of records as seemingly all fields are returned even if not explicitly requested.

3 Likes

One trick is to use Privacy Rules to reduce the fields in the records returned. If your 10k list is only displaying 3 fields, add a privacy rule so that only those 3 fields are returned to the browser. ( @dehacked79 :+1:)

4 Likes

But privacy rules are additive right so the more rights a user has the more fields he has access to, to perform other functions in the app based on various levels of privacy rules. Would be great if we had some way to say if user has X rights and he is on Y page then ONLY give him the following privacy rule.

3 Likes

That is true around additive privacy rules. Hmmm maybe split your table into two tables … maybe Algolia is less effort …

Little off topic. Can you, please, tell me how to do this?

Splitting tables seems the way unless you want to spend money with a 3rd party. Imo returning only requested result should considerably lessen load on bubble servers and umprove user experience. We can dream…

1 Like

put a elements which is has "custom state " in page somewhere, state type is number.
For example, elements name it rg_num. state name it row.

put a bottun which is has id “scroll_bottun” in page somewhere.
and put a html elements which is has this JS in page somewhere.

<script>
$(window).on('scroll', function () {
  var doch = $(document).innerHeight(); 
  var winh = $(window).innerHeight(); 
  var bottom = doch - winh; 
  var button = document.querySelector("#scroll_bottun");
  if (bottom <= $(window).scrollTop()) {
      button.click();
  }
  });
</script>

then,
set the workflow on the button. Set state, rg_num’s row + 10 or 5 or 15 whatever

“do a serach for” with Full list #item until rg_num’s row

Why not just use next/precious page actions, extended vertical scroll, or similar methods?

I hate it because it’s ugly. haha

because
the loading icon is not displayed correctly every time,
wanted the number to read next to be the same each time,
wanted to display the text with no more results to display,

I tried various things, but it worked better with FULL LIST
Is there anything wrong with using FULL LIST? If there is, please tell me.

2 Likes

It’s not feasible to have a full list of 10,000 things on a webpage. Is that what you are hoping to do? Browsers will have memory problems., and users will get sore fingers scrolling to the bottom of a list of 10,000 things :laughing:

It’s unlikely that the user will scroll from the first 10 displayed to the last 10000.
If the user wants to see past posts, they should search.

So I don’t think it’s a problem.

@ed727

thanks for reply.
wow, discourse.org
The bubble used it.

My wondered have been refreshed. thank you.

I want the bubble to be displayed as fast as discourse.org.

1 Like

I recommend this book. It explains how Bubble works from a performance perspective, so you can structure your app to perform well.

There are also some really good posts on the forum that discuss performance.

1 Like

I suggest you read Peter Amlie’s Bubnle performance book, real handy.
As you mention, you’re basically loading all data even if it’s not displyed. By filtering you only get that data.
Also for search, use Peter’s “satellite data type” solution. 2 data types, one for search (structured data) and one for the heavy data.

3 Likes

@nikifrancesca what do you mean with satellite data type? Two data types, one that displays everything and another that only displays only a few of those fields? If so, you are basically duplicate data so it seems. Which is a big no go so perhaps I misunderstood what it is…

I wasn’t aware of this trick. Thanks for sharing.