Ok, so I have been using Bubble for quite sometime now. And I feel like what I am seeing right now has turned most things I’ve come to learn about Bubble in concern of speed for retrieving data has just been turned on its head.
From different threads I’ve come to be of the understanding that using related data types is faster to retrieve data than to search the data type alone.
For example, I have ‘Analytics’ as a data type. It has fields (share date, ID (text value representing another data type it belongs to) plus some fields for Type and Sub Type which are option sets.
The ID of the analytics is the ID of the Job listing so I can match the analytic to the listing it belongs to…I set it up like this because I will use all Analytics for all my 'listings such as blog post listing, retailer listing, event listing etc. so I needed a catch all way of making a connection.
I have a job listing data type. It has a data field which is a list of ‘Analytics’.
My previous thought was that it would always be faster to on the Job Listings page use the ‘parent groups analytics list’ to search and retrieve the ‘Analytics’ data associated with that Job Listing. It would be faster compared to search for ‘Analytics’ and filtering by the Job Listing.
So my previous assumptions were that this search would be faster
I thought it would be faster than this search below because the search below is having to filter ‘all analytics’ while the search above is using only the analytics that are part of the field list of analytics on the ‘job listings’ data type.
When I test this using the chart element as well as a regular repeating group for visualizations of speed differences, the difference is dramatic.
The first search is the chart on the left, while the second search is on the right.
Notice from this gif that both charts are empty on page load…then after selecting the ID of the Job Posting the chart on the left loads almost instantly while the chart on the right takes 25 seconds longer than the one on the left to load the same data. The only difference is the chart on the right uses the list of analytics that is a field on the parent groups data type, while the chart on the left is filtering all analytics using the parent groups ID.
Here you can see the job listing has a field that is a list of ‘analytics’ which is about 100 times slower to load.
I’ve seen a lot of people make the same claims I always made about the performance of data retrieval being faster when having a related list field on a data type rather than filtering a data type to find all that belong to another data type.
Is there a best way for a specific use case? When would it be better to relate the data types and when would it be better to filter one data type or is it always the latter over the former?