Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

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

(1) ShareShare
ReportReport
Posted on by 674
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:
  • Suggested answer
    Michael E. Gernaey Profile Picture
    40,272 Super User 2025 Season 1 on at
    same filter code in clearcollect and items gallery property, huge time difference
    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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard