Summary
I have watched multiple MVP’s video talking about PowerApps performance. Here I want to make this as a list of DOs and DON’Ts for PowerApps performance.
DO: Use less data connectors in your app.
DON’T: Don’t connect to more than 30 data sources from the same app.
DO: Use a gallery instead of individual controls.
DON’T: Don’t add more than 500 controls to the same app.
DO: Use Concurrent function to reduce the overall time to load data in parallel
DON’T: Don’t load data in sequential ways.
DO: Use the Set function to cache data from lookup tables locally.
DON’T: Don’t repeatedly retrieving data from the source using Lookup.
Avoid control dependency between screens
DO: Write global variables to transfer control’s properties info from one screen to other.
DON’T: Don’t create formula dependencies between screens. e.g. Control property value of other screen in the formula.
DO: Where possible, use functions that delegate data processing to the data source.
DON’T: Don’t retrieving data to the local device for processing. This is an resources intensive step.
DO: Republish the apps frequently to take an advantage of any latest features.
DON’T: Don’t keep the app published only once when launched. Publishing it frequently has advantage plus it will keep multiple versions.
Enable DelayOutput on all Text input controls
DO: Set DelayedOutput to true for a text box control. This will help in performance if the text box value is used as search to filter gallery.
DON’T: Don’t keep DelayedOutput as false (default) this will impact the performance when the text box is used as search to filter gallery. With false it will do a filter for every character user types.
Use Spinner to load Gallery Data
DO: For Gallery controls set DelayItemLoading set to true, and LoadingSpinner set to LoadingSpinner.Controls.
DON’T: Don’t simply load the data in the gallery.
Avoid Lookups in the Gallery
DO: In the Gallery controls do set a global variable for objects. e.g. Set Office365Users.MyProfile().GivenName to set some variable.
DON’T: Don’t simply load the objects using Lookup within the gallery.
First value of Filter Vs Lookup
DO: Do use the Lookup to return a single result. This scans the data set until it gets the first match and stops scanning after the match.
LookUp(Employees, StartsWith(Title,"Pankaj")).Position
DON’T: Don’t use the First to get to one single record. Scans the entire data set using Filter to get the matched data.
First(Filter(Employees, StartsWith(Title,"Pankaj"))).Position
Conclusion
The above listed performance tips are at multiple places. I wanted to keep this list as clear and concise for the simplicity.