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

PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Top Kudoed Authors
Users online (2,482)