In many enterprises, the slow performance of Power Apps has statistically been related to:
- The way of implementing the app
- the bottleneck in data sources
- usage patterns like browser types
- geographical location of on-prem data gateway and environment
- throttling in a gigantic volume of requests onto a backend within a brief period
Below are some more points to consider on how we can improve performance of our app by focusing more on the 1st point mentioned above (The way of implementing the app) when you build an app.
- Try to limit the number of controls on the screen. The time taken to render the page in PowerApps screen has a direct relation with the number of controls on the screen. There is not a defined limit but at around 300-400 controls, there have been experiences of slow loading times.
- Use Components rather whenever you need to reuse certain blocks like header or footer. Components also reduce duplication of efforts by eliminating the need to copy/paste controls and improve performance.
- Have the right data source for the task you’re looking to process through your low-code app.
- Loading Data on App Start, On Visible, and within individual controls like the gallery control.
- User Pre-loader animation to sets user expectations while data is loading.
- Fetch data in such a way that the required data are loaded at first and while user interaction is happening call the remaining data in the background.
- Use Concurrent Call in cases when you don’t have to do serial calls. Concurrent function evaluates multiple formulas at the same time
- User Monitor tool to find events and logs that could help diagnose performance and functional issues.
- Use compressed images to minimize the time to download them.
- Update view of the data in such a way that users see data updates reflected in the user interface while actual save (Patch/Submit) is done in the background.
- Avoid passing context variables between screens when a global variable is more appropriate.
- If you have multiple formulas or rules that reference the value of a Text input control, set the DelayOutput property of that control to true.
- Use inline expressions in control properties instead of putting logic in the OnVisible event in your PowerApp’s first screen.
- Limit your use of collections, try to use them only when absolutely necessary.
- Limit your use of context variables, try to use them only when absolutely necessary.
- Use ClearCollect instead of Clear;Collect().
- Use CountIf instead of Count(Filter()).
- Update all necessary context variables in a single UpdateContext call
- Avoid using unnecessary DataCards or Canvases if they have nested galleries, which will not work in the future.
- Don’t use multiple variables when you could just use a single one.
- Don’t ‘nest’ secondary logical tests by explicitly writing If after the initial statement.
- User one control’s styling properties like color, fill, x, y, width, height properties as the master to style other controls.
- Use galleries whenever there is repetitive data instead of using multiple repeated controls to show as if it is a grid.
- Use a single screen to handle edit/insert operations.
- Use a CardGallery to handle updating data instead of referencing individual controls in a Patch function.
- When working with an Excel sheet as a data source, use one DataTable per worksheet.
- Don’t connect to more than 30 data sources from the same app.
- Use the ClearCollect function to cache data locally if it doesn’t change during the user session.
- Use the Set function to cache data from lookup tables locally to avoid repeatedly retrieving data from the source.
- Use functions that delegate data processing to the data source instead of retrieving data to the local device for processing.
- Republish your apps to get performance improvements and additional features from the Power Apps platform.
- Avoid repeating the same formulas in multiple places
- Don’t use Set to create a context variable, which holds a piece of information scoped to single-screen use UpdateContext instead.
- Use IsError for exception handling wherever possible
- Handle SubmitForm failure or success using onFailure or onSuccess.
- Ensure no delegation warnings from the app checker.
- where you can try a new formula bar experience with improved speed and usability features informed by some of the requested improvements from the community.
- Use HTML control to display images or displaying images to lessen the load on the Media
- If you are using custom APIs in your apps, you should enable server-side caching as you would do normally three tier applications.
- Maintain your app quality by continually validating that your app works as expected when new changes or updates are deployed using Test Studio.