Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

Filtering collection performance

In an app I have a collection with some data, around 200 rows. When I want to filter the data with a control like radio buttons or a listbox, this works, but there this slight delay between pressing the radio button and the filtering happening. It is just enough that the whole thing feels sluggish.

In the attached example some dummy list with 140 records and 4 columns is filtered. The radio button items are hard coded (not a separate collection). The list filter criteria references the radiobutton.selected.value directly. I also triend it with a varaible for filtering criteria, but it does not seem to make a difference.
Using collections below 50 records does seems to give a better response when filtering.

I am doing something wrong? Is there a way to improve this with "larger" collections?

Responsive Resident
Responsive Resident

Have you tried using Collect function on your datasource and then using this local version in your gallery? When you filter PowerApps makes a new call to the datasource, so by filtering locally you should see a performance improvement.

Note that this may bring problems if you have more than 2000 items in your list due to delegation

Hi @Dihelium,

@Sofie_D is right. In the OnVisible property of the gallery screen, ClearCollect(colDatasource, Datasource). In the gallery make the Items property Filter(colDatasource, yourcolumn=Radio1,Selected.Value). The filter will be instantaneous when you change the Radio control.

Sorry if I was unclear. With "collection" I mean any datasource I have collected using the "Collect" function, so I did as you describe. The filtering of the gallery showing the collected data using the radiobutton is not instantaneous.

Hi @Dihelium,

I tried to recreate your issue on my side and could not reproduce it.  I am using a SharePoint list and my gallery responds instantly to any change in the Radio control.  Since the collection is local, it should not matter what connector you are using and any delay must be related to local factors.  Have you tried doing it on a different computer?  Is there more lag when you use the actual datasource in the Items property of the gallery?

Hello @Drrickryp


It may have something to do with how much of the data is actually being displayed on screen by the gallery. In my test app, when the the template size of the gallery is 20, around 40 lines are shown. This give a lot worse performance then when the tempalte size is set to 200, showing only 4 lines of data. Adding more labels in the gallery also impacts the performance further.

Hello @Drrickryp,

Were you able to reproduce the same perfomance issue when much data is displayed by a single gallery?

Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (4,635)