Hi gang. Quick question: I have a repeating list that potentially contains thousands of Things (“Thing 1”). Each one of THOSE things contains a list of 1-5 associated Other Things (“Thing 2”). On the initial page load, I only want to see a list of Thing 1s. When someone clicks on Thing 1, I then want to fetch the smaller list of Thing 2s.
I’ve already got my list of Thing 1s working fine. And when I click on Thing 1, I’m seeing my Thing 2 stuff appear, as desired. The Thing 2 list is a repeating group inside of a group that I reveal via Toggle. (Essentially I’m toggling off Title-Only-Mode group and toggling on the Details-Mode group. Here’s my question…
Am I correct in assuming that my repeating group of Thing 2 items are not being fetched until that toggle is triggered to show Thing 2’s parent group?
I don’t have a ton of test data in my Db yet, so I’m finding it hard to judge the performance at scale. My concern stems from the fact that although my “Details Mode” group is NOT visible at page load, the Repeating Group of Thing 2 items IS visible on page load. I don’t see them, since its parent group is not visible. But I’m wondering if they’ve been fetched prematurely/unnecessarily before the user has clicked to drill into that particular Thing 1. Make sense? Thanks!!
From what i understand anything that is not visible on page load will not run any data fetching until it is visible. An exception will be popups which will fetch any data on page load (hence why some Bubblers use popups to store data). Someone correct me if i am misunderstanding how non-visible elements work.
What u can do though is use the debugger in preview to check if that particular RG has loaded data.
I should have checked the Inspector, rookie move. This revealed a related question though…
In my Db, I have an attribute on my Thing 1 called Thing2Items which is a List of Thing 2s. Whenever I create a Thing 2 belonging to Thing1, I add its ID to that list/array. Since the most I’m apt to have is five Thing 2s for any given Thing1, I thought that was a smart move, for quicker access to that list of Thing2s.
However, does the fact that I have this list of Thing2s attached to each Thing1 mean that every single one of those Thing2 arrays is being fetched when I render my list of (potentially) thousands of Thing1s? If so, maybe I need to ditch that Thing2Items on my Thing1 data type. Use a Search instead? Thoughts? Thanks again!!
A lot of informations about how Bubble work and fetch data and how to improve performance. There’s no single answer sadly. Each case are different and depend on how you will display data to user.
As long as you keep point ur RG’s data source to a specific list (eg. stored in a state) or/and keep your constraints within a “Do a search”, your RG will not fetch all data in that list of Thing 2s.
It definitely will eventually slow down if you add any advanced filters (ie :filtered) into ur Data Source. Cause :filtered runs client side.
A good practice, if it can apply to your app, is to have things grouped/categorized further. Such as grouped between Organization, Team or categories such as Fruits, Pastries etc. This let’s u lean out your DB and improves load times.