Categories: Microsoft Flow

Improve your flow’s performance in a few easy steps

In recent days I’ve had a look at performance in Microsoft Flow and how to improve the performance of my flows with easy steps or patterns. We all know that nested Apply to each steps are not a great idea or maybe …

Therefore I started by creating some nested apply to each steps. If you do a bad job then do at least a really bad job!

I’ve got a number of set variable actions and a number of compose actions. All of these are building up some HTML out of data collected from SharePoint using Get Items actions.

To run all of this within an apply to each about 45 times takes 16 minutes. Pretty performance poor isn’t it?

I decided to optimise the flow a bit by adding Select statements straight after the Get Items actions and I gained 10 minutes. Simply by adding all the complexity into a single select my flow started to perform a lot better

I always thought that the usage of the variables would really cause the performance trouble as Flow is waiting for  locks on the variables. Both versions of the flow are using the same number of variables and the same number of compose actions.

Time to look at the details.

Within the original Flow within the Apply to each there were a lot of expressions used. Moving these expressions from the nested apply to each steps to a single Select action reduced the complexity in the nested Apply-to each steps.

In the optimised flow I put all my expressions in the Select action.

This now means that as I use a Set Variable inside my apply for each becomes very simple a set of references to my data returned by the select.

Share
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.

Recent Posts

Create new group alert using Power Automate

Do you want to know when a new group has been created with for example…

3 days ago

Delegation Warnings in Power Apps

We have all seen them, Delegation Warnings, but what is delegation and how do you…

3 days ago

1 Top tip: PowerPlatformLearn.com and master the Power Platform within no time

It can be difficult to get started with the Power Platform, blogs help, training helps,…

2 weeks ago

Compare 2 Excel files using Power Automate

This is such a common scenario. You receive Excel files on a regular basis and…

2 weeks ago

Rename SharePoint folders using Power Automate in 2 easy steps

Have you ever wanted to rename SharePoint folders with Power Automate? REST API call to…

3 weeks ago

Read dates from Excel with Power Automate

To read dates from Excel files can be tricky, as Excel only give you the…

4 weeks ago
%%footer%%