I am finding several performance issues with PowerApps and after using the Monitor am discovering how inefficient it is.
For example, I have a function to count the number of rows in one list based on criteria. In my case I have a list of projects and a list of issues. The Project ID is one of the fields in the Issue list, so when I am showing a gallery of projects I want to show the Count of how many Issues each project has. In PowerApps, I use a function like this:
In Monitor, when I look at the data being transferred for this one call, I see instead of a single value, such as 8, being returned that instead I get 8 rows of the entire Issue list being transferred across the network.
If instead I were writing this as a mobile app in Xamarin, I would have called a web service that returns the number 8 when I pass in a Project ID. Or better yet, I would pass a set of project IDs and get back in a single call a set of issue counts.
Similarly, in SQL, I could write a query like this:
SELECT COUNT(ID) FROM Issue WHERE ProjectID = ?
And this would return for me a single number.
Why with PowerApps does it find the need to download all of the Issue records for the project in order to figure out how many of them there are?
Am I the only one out there who is frustrated by this? Am I just doing something wrong?
Thanks for your answers in advance!
No I think that misses the point. The only data I need to transfer across the network is the count of how many there are. It seems horribly inefficient to transfer the entire list over and store as a local collection just to count them.
The COUNTROWS function cannot be delegated meaning SharePoint cannot perform the calculations on the server-side. Only a few functions can do this. See below.
List of functions that can be delegated in SharePoint:
My solution has been to store the count of issues in the SharePoint table for each project and increment/deincrement each time an issue is opened or closed.
Then to display the IssuesCount inside of an app you could do a LOOKUP.
LookUp(your_projects_list, Project="A", IssuesCount)
What I like about my method is the IssuesCount is a stored value. No calculations are being performed when the information is needed so speed to fetch the value is fast!
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."