cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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?

6 REPLIES 6
Highlighted
Responsive Resident
Responsive Resident

Re: Filtering collection performance

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

Highlighted
Super User
Super User

Re: Filtering collection performance

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.

Highlighted
Helper I
Helper I

Re: Filtering collection performance

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.

Highlighted
Super User
Super User

Re: Filtering collection performance

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?

Highlighted
Helper I
Helper I

Re: Filtering collection performance

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.

Highlighted
Helper I
Helper I

Re: Filtering collection performance

Hello @Drrickryp,

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

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,101)