web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / same filter code in cl...
Power Apps
Suggested Answer

same filter code in clearcollect and items gallery property, huge time difference

(1) ShareShare
ReportReport
Posted on by 704
Hi,
 
I am trying to enhance the peformance of my app.
Loading data in a gallery takes a long time so I tested loading the data in a collection in stead of the gallery.
I use powerapps monitor and find that the code Filter(Mytable,Mycriteria) used in the items property of the gallery takes 43 seconds
However if I do ClearCollect(MyCollect,Filter(Mytable,Mycriteria)) it takes 2 seconds.
 
The difference would then be explained by code for the gallery item controls I presume?
Since monitor does not specify on that level is ther someway to find out except for scrutinizing alle code for every control?
Or is many controls with lots of specific for codes/colors/fills etc based on available item properties enought to cause this kind of performance drop?
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,433 Super User 2025 Season 2 on at
    Hi
     
    There are numerous reasons why, as you learn the platform better they make sense.
     
    However, without seeing your Code, without seeing your App, when and where the Gallery loads versus your ClearCollect, its impossible to give you a 100% answer, just impossible.
     
    BTW is this Dataverse or Sql or SharePoint?
     
    Regardless of which one you do, you should be using Views, to limit the column counts.
     
    ClearCollect is an instant thing. Many controls have intentionally buffering etc and delayed loading on purpose because they are async, where as the ClearCollect is not (at least not relative to your next lines of code).
     
    Also, how many records show up in the Collection, versus how many get displayed?
     
    Get the total count of records in the Gallery AllItemsCount, versus the ClearCollect

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard