Performance

Power Apps is all about user experience. If performance is poor then your Power App might not be very well received by your users.

Performance improvements

What do you do when you Power Apps takes its time during start up? Or even worse when ever click you do you get those annoying dots flying across your screen.

Before I can look at improving performance of apps developed in Power Apps it is important to understand the different options of data. I’m going to have a look at a few different data sources.

SharePoint Lists

Select a list as a datasource

The first type of connection is a SharePoint list.

Within Power Apps you select a list as your data source.  you now have the option to set the number of items returned to up to 2000 items and you could use the filter function to filter the data from your data source.

Filter a list affects Power Apps performance

As shown below the filter function could give you warnings that your app might struggle to perform on large data sets.

When you filter on data you will need to make sure that you use indexes on your list. Especially on large lists the filters will become critical for the performance of your app.

Connector API Calls

Another option is to use operations offered by connectors. One example of this is the SearchUser operation that is offered by the Office365Users connector. This operation gives you user accounts matching certain criteria.

Search Users

Also consider the number of records returned to improve the performance of the app. will users really look through all 600 items? Or could you just show the most relevant 10 people?

Collections

It is also possible to set collections of data when you start your app as shown below.

Collections

Or you could of course set a collection at any other time. you can then view these collections within the Power App Designer under the Collections option.

Collections in App

When working with collections you might have to do some work to get your data refreshed, but it does means that reusing the same data in multiple places becomes faster.

Multiple Data sources

When you nest galleries, you might find that things become slower as you might run queries across multiple data sources. A typical situation would appear when you create a staff directory.

Collect all the details for all the users and then collect all the photos for each user. Collecting all the photos can be slow. A good starting point for solving these kind of issues is the People screen template

PeopleTemplate

The people template shows a good example of:

  • limiting the people displayed using a filter
  • using collections
  • multiple connector calls

SQL Databases and Power Apps performance

How about data that comes from multiple tables in SQL? could you first massage the data so that it becomes easier to consume by your Power Apps?

Creating a view in your database is most likely going to perform a lot better than complicated logic in Power Apps.

Improving performance

Now that we have had a look at where the data comes from in apps. It is important to look at how to optimize the app. Depending on the data sources that you may be using you might have to make different choices.

If you have control over indexes in you data sources. e.g. SharePoint lists then you should consider creating indexes on your list columns.

Another option can be to run enable concurrent calls. Concurrent calls allow you to run multiple queries at the same time however you will need to be careful that you don’t exceed the limit of 30 concurrent calls.

You could now for example run multiple timers and load your data within these timers as described in the above mentioned article.

By Pieter Veenstra

Business Applications and Office Apps & Services Microsoft MVP working as a Microsoft Productivity Principal Consultant at HybrIT Services. You can contact me using contact@veenstra.me.uk.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: