cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Adi2ro
Helper I
Helper I

Slow performance

Hi all,

 

I have a slow performance on an app even thou my list is quite small. Let me explain the full scenario:

 

I have a list with companies and a list with clusters. The same number of clusters apply to all companies, meaning an analyst is not assigned the entire company , but one cluster. 

 

When they open the app I have a screen with two galleries:

 

1. With the cluster list

2. With the companies list

 

Because they don't assign themselves to the entire company I have another list called "Cluster Research". The second gallery has a AddColumns so that it only shows companies that DO NOT have research generated. For this reason, even if I have 500 companies in the list, the app is very slow at this step. 

 

This is the code for the second gallery:

 

If(IsBlank(selectedcluster),Blank(),SortByColumns(Filter(AddColumns(Filter(Companies,CompanysCycle=researchcycle),"Should be visible?",If(IsEmpty(Filter(ClusterResearch,ClusterResearchCycleID=researchcycle,CompanyIDClusterResearch=CompanyID,ClusterID=selectedcluster.ClusterID)) Or LookUp(ClusterResearch,ClusterResearchCycleID=researchcycle And CompanyIDClusterResearch=CompanyID And ClusterID=selectedcluster.ClusterID And AnalystEmailperCluster=currentuseremail,ClusterStatus)="In progress","Yes","No"),"Own company?",If(LookUp(ClusterResearch,ClusterResearchCycleID=researchcycle And CompanyIDClusterResearch=CompanyID And ClusterID=selectedcluster.ClusterID).AnalystEmailperCluster=currentuseremail,"Yes","No")),'Should be visible?'="Yes"),"Own company?",["Yes","No"]))

 

Both clusters and companies have research cycles (since the process needs to happen once a year.

 

Using bigger lists of companies is not working at all, huge delay upon selecting a cluster when the companies need to load.

 

Thank you in advance! 

4 REPLIES 4
rsaikrishna
Dual Super User
Dual Super User

@Adi2ro 

 

In your SharePoint list, add Indexed Columns for all the columns mentioned in the Filter, Query formulas.

 

Also, I see there are nested Filters and LookUps in your formula. You may need to see if you can simplify the logic.

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

 

Hi @Adi2ro ,

On Top of @rsaikrishna  suggestion, if you are using a direct call with Source  in Nested Filter then better get all the data into the collection and use that collection for Nested filter purpose,

another suggestion is use the Concurrent function for Improve the Performance if you have large dataset.

Thanks,
Vijay,

Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."-Vijay



Adi2ro
Helper I
Helper I

Concurrent functions? I need to research that, not sure how to do them or what they are about.

 

An update: Eventually I decided that AddColumns is too hard for the system to handle especially for large dataset so what I did is made a flow that generates items and work only on one list.

 

One question in case you might know: My flow got throttled because of how many items I added and the trigger was on create item... throttled means it canceled submits over the limit or just delay them until it can handle them?

@Adi2ro 

 

Concurrent functions: It is really recommended when you are performing independent actions such as loading multiple collections or setting variables or other actions. As we do not know the sequence execution of the actions, we need to keep independent actions in the Concurrent method.

 

Your second question: In the flow, various actions and triggers have different throttling limits. We need to consider maximum number of records processed by the flow at a time while designing the flow. If you are using flow for backup or updating huge number of records, it is better design the flow to support batch process to stay within the throttling limits. Once the flow reaches throttling limits, it will suspend the actions till it resets the time period. For example: Apply to each can process 5000 items

For more information: https://docs.microsoft.com/en-us/power-automate/limits-and-config

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

 

Helpful resources

Announcements
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 Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (27,743)