power app logo displayed on smart phone

Boost the Performance of Your Power Apps: Insider Tips and Best Practices

Power Apps

Posted by Charlie Phipps

I recently had the privilege of delivering a workshop with the esteemed Paul Murana at DynamicsMinds, and today, I'll share with you the invaluable insights we discovered.

Discover the Common Pitfalls by reading the mistakes that hinder Power Apps performance. Creating Power Apps can be a breeze but beware of the pitfalls that both developers and businesses often stumble upon.

It all starts with identifying the criticality and scalability of the desired solution. If you are building an internal app for a small number of users, this will not require you to follow an extensive development lifecycle. What do I mean by this? As shown in the image below, when you create a business-critical application you will go through more reviews for example, penetration testing, performance testing and user acceptance testing. Now let’s not forget why people and businesses choose Power Platform. We choose Power Platform because it enables us to build fast solutions quickly, however, this usually leads to businesses making mistakes. By not considering the criticality and scalability of the solution this will impact crucial decision making for example what data source to use, what licences are required and what testing approach we shall adopt.

charlie blog 1

"Power Platform improves business outcomes by 140% ROI over three years."

- Forrester TEI

When it comes to Power Apps' performance, the choice of data source plays a pivotal role. Let me shed light on the differences and share my expert opinion. As users open a canvas app, several execution phases unfold before the user can interact with the application, these stages include:

1.      Authenticate the user

2.      Get metadata

3.      Initialise the app

4.      Render the screens

The following diagram shows a data call flow with online data sources such as SQL or SharePoint.

charlie blog 2

If we compare this to a data call flow with on-premise gateway then we can see there is an extra layer added to the call.

 charlie blog 3

When you use Microsoft Dataverse as the data source, data requests go to the environment instance directly, without passing through Azure API Management. Because of this, the performance of data calls is much faster compared to the rest of the data sources.

Does this mean that Microsoft Dataverse is the most performant data source?

Microsoft Dataverse emerges as a formidable contender for the most performant data source, but is it truly the champion? For simple applications that connect to a single table without requiring extensive lookups or filters, Dataverse undoubtedly reigns supreme. However, in larger solutions, SQL proves its mettle as the more performant option. How, you might wonder? SQL's ability to utilize views for data processing and filtering offers superior performance. By shifting the data processing burden to the backend rather than the frontend, you can unlock enhanced performance in your Power Apps.

Formulas, Delegation, and Memory Management: Keys to Unleashing Power Apps' Potential

Making connector calls sequentially is slow because the current connector call must be completed before the next one starts. 

The Concurrent function allows Power Apps to load data faster by simultaneously processing multiple connectors calls at once. Only use the Concurrent function to retrieve data stored in the cloud.


charlie blog 4

You should write formulas that use delegation.
Delegable filters are filters that can be pushed down to the data source for processing, allowing the data source to perform the filtering operation instead of retrieving all data and filtering it within the app. Some functions and operations are non-delegable, meaning they cannot be processed by the data source and must be executed within the app.

You should consider the amount of data in memory. If you are building an app that requires to view more than 2000 rows of data, then I would argue whether Power Apps is the tool for you or have you considered the user experience? A big tip I have here is to only load data on the page that it is required.

You should cache data in collections and variables . Data stored in memory can be accessed very quickly. A cloud data source must receive a connector call, perform a query, and send a response back to the device before data can be displayed on-screen.

Limit the size of collections to the least number of rows and columns that required by the app. Mobile devices have tight restrictions on memory usage. Collections are stored in the device’s memory. If too much memory is in use the mobile operating system will kill the Power Apps process and the app will crash. To achieve this, use the ShowColumns function. This allows you to filter out unwanted columns and retrieve only the columns you need for further processing or display.

Mastering Media for Optimal Performance

Large media files can impact performance. Where you can, use SVGs because they are more performant. For example, you would not use a loading gif within Power Apps, you should be achieving the same type of loading spinner through an SVG.

Common mistakes made that cause performance issues in Power Apps.

You need to reduce the code on the on-app start. The more code that is in the app’s OnStart property, the longer an app will take to start. Improve app startup time by initialising global variables in the OnVisible property of the app’s first screen.

I see this mistake all the time, but you need to be careful of cross-screens controls references. This usually occurs when duplicating screens, some formulas (height, width, x and y) might still reference previous controls which means the entire screen has to be then rendered.

Avoid using Form. Updates in rules and formulas . If you reference a user-input value in a rule or a formula by using a Form .Updates variable, it iterates over all the form's data cards and creates a record each time. To make your app more efficient, reference the value directly from the data card or the control value.

We have mentioned it previously, however you should limit the amount of columns you receive. Use the ShowColumns function to enhance the performance when loading data.

Tips for improving the performance of your Power Apps

Use Batch Patch method rather than sequentially patching.


charlie blog 5

A ForAll will loop through every record in the collect and the patch each record individually, whereas you can just patch the entire collection like this:

charlie blog 6

Makers are encouraged to publish their apps regularly. Because the Power Apps platform is continuously optimised and deployed, your app is regenerated within the latest platform optimisations when you republish it.

When using forms, handle form failure and form success through onFailure or onSuccess property rather than through a condition on the button. Use IsError for exception handling wherever possible. The return value is a Boolean true or false. Using IsError will prevent any further processing of the error.

Conclusion and Key Takeaways

In conclusion, optimising the performance of Power Apps requires careful consideration of various factors and implementing best practices. By avoiding common pitfalls and following insider tips, you can enhance the efficiency and effectiveness of your Power Apps solutions.

Firstly, it is essential to assess the criticality and scalability of your desired solution. Tailoring your development lifecycle, testing approaches, and licensing decisions accordingly will prevent potential setbacks. Choosing the appropriate data source is crucial for Power Apps performance. While Microsoft Dataverse offers fast data calls for simple applications, SQL shines in larger solutions due to its ability to utilize views for efficient data processing and filtering.

Formulas, delegation, and memory management are key elements in unleashing the full potential of Power Apps. Leveraging the Concurrent function for the simultaneous processing of connector calls can significantly improve data loading speed. Delegable filters should be used to push down filtering operations to the data source, reducing the need to retrieve and filter all data within the app. Carefully managing data in memory, using collections and variables, and limiting the size of collections contribute to optimal performance and prevent crashes.

When dealing with media files, using SVGs instead of larger file formats like gifs can enhance performance. Avoiding common mistakes, such as reducing code on app start, addressing cross-screen control references, and avoiding unnecessary Form.  Updates iterations, further improve the efficiency of Power Apps.

To improve performance, consider using the Batch Patch method instead of sequential patching. Regularly publishing your apps ensures they benefit from the continuous optimization and deployment efforts of the Power Apps platform.

By following these tips and best practices, you can boost the performance of your Power Apps and deliver seamless user experiences, ultimately maximizing the value of the Power Platform for your business!

Want to get in touch?

As a Microsoft FastTrack Ready Partner with extensive industry and technology experience, we help organisations to improve productivity. We are uniquely placed to drive the adoption of Microsoft Technologies and level up your healthcare organisations way of working using your use cases!

If you want to find out more information on using Power Platform to automate your processes, get in touch!