Help/Advice with setting up efficient filtering feature

I am currently working on a to-do list app and have a feature that displays a user’s events and the events of other users that are in the same group. I am setting up a filtering feature for the repeating group that is displaying the events and have been instructed that the repeating group should only filter the search on a button click and not automatically. The way I have it setup is as follows:

  1. “do a search” for events in the repeating group on page load without using the filters as constraints

  2. when the user selects the filters to put in place and clicks the button to apply filters, there is another search done and displayed in the repeating group which does constrain using the filter fields (done using the action “display list”)

  3. clicking the cancel button uses the action “display list” for the repeating group and does the original search that happens on page load

The functionality of this works completely fine but my question lies in how efficient is this from a performance stand point. From my understanding, searches done are downloaded to the RAM and if the same search is done, the data is just pulled up from there (please correct me if I am wrong).

Will this setup slow the app down if done at scale or is this fine to do? And if it will slow it down to a not insignificant degree, what would be the most efficient way to do this?

In your approach Do a search for is executed 3 times, but I think it can be 1 time.

first you need a hidden RG that will do this search:
111111111

Second you need second RG to display the events, the data source of this RG is the previous (hidden) RG:
2222222222222

So in page load the hidden RG will retrieve the events and the visible RG will display them.

Third, instead of Display list action when the button is clicked, you may just set state of type yes/no.

forth, in the visible RG you need a conditional that will change data source when the previous custom state is yes, the new data source will also be the hidden RG but with the :filtered with only the additional constraints:
3333333333333333333333333

fifth, when cancel button is clicked you need to change the previous custom state value to NO, so the main data source of the visible RG will return to work.

1 Like

I appreciate the help, makes complete sense and seems a lot more efficient.

On a separate note, do you know if there is a way to measure the workload units of workflows and actions? From my understanding the section in bubble refreshes every so often but kind of takes a while and doesn’t allow me to measure too accurately.