Power Automate Standards: Performance Optimization

Power Automate Standards: Performance Optimization
Table of Contents
• Enable Concurrency Control In Apply To Each LoopsExecute Flow Actions In Parallel BranchesUse Filter Queries When Retrieving Large DatasetsReduce Table Sizes By Selecting ColumnsStay Below The Data Connector API LimitsIdentify Bottlenecks With Process AdvisorFavor Compose Over Declaring Variables When Creating ArraysExploit Batch Update APIsAvoid Using On-Premise Actions


Enable Concurrency Control In Apply To Each Loops

Apply To Each loops run sequentially by default. If there are 20 items to loop over, the flow will run them in order: 1, 2, 3… until it reaches item 20. Enable concurrency control in the Apply to Each action settings to run up to 50 actions at the same time.




Execute Flow Actions In Parallel Branches

Power Automate executes flow actions in sequence. But actions can also be run in parallel when they are not dependent upon each another. For example, a flow that gets multiple lists of items in sequence may be reorganized to get all lists of items at the same time.




Use Filter Queries When Retrieving Large Datasets

It takes more time to retrieve a large set of records from a datasource than a small set of records. Apply filters when fetching data to reduce the number of rows being downloaded.

If there is no option to filter the records before downloading them use the Filter Data Operation immediately afterwards. Smaller datasets require less iterations in loops.

Example: Dataverse – List Rows action




Reduce Table Sizes By Selecting Columns

Similarly, a table with more columns is slower to download than a table with less columns. Always define which columns should be selected to minimize the size of the dataset being downloaded.

Example: SharePoint Get Items action



Example: Dataverse – List Rows action




Stay Below The Data Connector API Limits

Every flow data connector has API limits for throughput. After a set number of API calls per minute the data connector will become throttled to protect the service. Be aware of the API limits for each connector used in a flow. API limits can be found in the Power Automate documentation for the data connector.

Example: Dataverse connector limits




Identify Bottlenecks With Process Advisor

Process advisor tracks the average duration of individual flow actions as well as total duration. Inspect flows using process advisor to see where bottlenecks are occurring. Focus attention on the slowest actions when improving the flow.




Favor Compose Over Declaring Variables When Creating Arrays

The Compose action executes twice as fast as declaring variables. For large arrays this is a huge time saver. Use Compose instead of a variable to build arrays when the array does not have to be modified.




Exploit Batch Update APIs

Look for batching capabilities in APIs. Batching allows us to do a high-volume of transactions at high-speed. For instance, SharePoint lists have batch create, update and delete abilities only accessible through the SharePoint HTTP action. Read the API documentation for the desired service to check if this is available.




Avoid Using On-Premise Actions

Flow actions that connect to cloud resources are faster than on-premise records. For example, it would be faster to access files stored in OneDrive than files stored on the local File System via a gateway.





Questions?

If you have any questions or feedback about Power Automate Standards: Performance Optimization please leave a message in the comments section below. You can post using your email address and are not required to create an account to join the discussion.

Subscribe
Notify of
guest

4 Comments
Oldest
Newest
Inline Feedbacks
View all comments
Johannes
Johannes
17 days ago

Under “Enable Concurrency Control In Apply To Each Loops” you have written:
“Apply To Each loops run sequentially by default.”

This does not seems to be the current default behavior. In Power Automate I find this description:

“By default, Logic App instances run at the same time, or in parallel. This control changes how new runs are queued and can’t be changed after enabling. To run as many parallel instances as possible, leave this control turned off.”

Johannes
Johannes
15 days ago

Hi Matthew,
this is the official description in Power Automate in the Apply to each action under Settings -> General -> Concurrency Control.

Screenshot_20240407_133547.jpg