Hello everyone. I’m not exactly looking for help, as much as I would like to see what everyone’s experience is on database loading speed using two different methods, so that going forward I’m creating my databases in the most efficient way possible.
Since there is often more than one way to accomplish the same task on Bubble, I’m not sure which is really the “right” way to do it. When I started on the platform, I began building an app that grew and became a monster. The database has a few million entries spanning over 60 data types. The user’s dashboard necessitates that it is a one-page application, so there are many groups that show/hide based on custom states. Many of those have repeating groups to display various data types.
At the beginning, I didn’t really know of any other way to display the data in repeating groups other than using “Do a search for…” and adding the constraints, such as “Clients > Servicing Representative = Current User” to show only the list of clients that pertained to that particular “Representative”.
As time went on, I refined the database structure to save data types against other data types. Such as “Representatives” have a list of “Clients”, and so forth. My though with this was that having a smaller list of potential data to work with for each user would make repeating group load times much faster.
When the application contains thousands of “Clients” and you have to perform a search for only those “Clients” that match the particular constraints, it seems as though it would be much quicker to only display the few hundred “Clients” that belong to a particular user.
So, I set an example repeating group to display “Current User’s List of Clients” rather than “Do a Search for Clients > Representative = Current User”.
Now, here is where the questions comes in, and I apologize for the lengthy set up. What is you experience with loading times in your groups using these different methods. I actually found that the “Display list of Current User’s Thing” method was actually far slower than performing a search for a “Thing” with the necessary constraints. And this is a difference between less than a second to perform a search and display, vs 8-10 seconds of loading time to display a list of users “Thing” in the group. What is your experience, and is there something that I’m missing? Thank you for your input and feedback. Like all of you, I’m just trying to decide on the best way to serve information as quickly as possible to the user, when you have a big database.
Example:
This method is very fast
Repeating Group: Type = “Client”
Data Source = “Do a Search For Clients”
Constraint = “Representative = Current User”
Sort by: Last Name
VS
This method is very slow
Repeating Group: Type = “Client”
Data Source = “Current User’s Clients”: Sorted by Last Name