cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RakeshSarangi
New Member

Apply for Each is very slow to execute

Hi,

 

I am using GetItems to get records from a Sharepoint List and then using Apply for Each to loop through the records. My observation is that the Flow gets stuck up in Apply for Each and takes 30 mins for looping through 150 records.

 

Any help is appreciated for improving the performance of the Flow

1 ACCEPTED SOLUTION

Accepted Solutions
v-monli-msft
Community Support
Community Support

Hi @RakeshSarangi,

 

If you have too many requests come at the same time, this situation might appear. Please try to add a Delay action to this flow to test if this could help.

Capture.PNG

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-monli-msft
Community Support
Community Support

Hi @RakeshSarangi,

 

If you have too many requests come at the same time, this situation might appear. Please try to add a Delay action to this flow to test if this could help.

Capture.PNG

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Hi,

 

I am also experiencing a significant slowdown when my flows hit apply to each to loop through records from Get Items. Where does the Delay action get added in?

 

Thank you

SteenJakobsen
Frequent Visitor

You can perform GetItems on 10,000 items in 4 seconds and update all 10,000 items in ❤️ minutes

using Fusion from No-Code Solution.

 

The Fusion job can be initiated from Flow and you can pass in parameters including Site URL and List name.

Also Fusion automatically persists the version number and the values in Modified, ModifiedBy

 

Flow takes 1 hour and 10 minutes to complete the same action with maximum paralelims enabled.

- And Flow generates a new version and overwrites Modified & ModifiedBy.

 

 

Quite and extension to Flow I think 🙂

Robhcc
Advocate II
Advocate II

Hi @RakeshSarangi ,

 

There are two things potentially going on, one its to minimise the use of Variables in the Flow, they will significantly slow your flow down, especially if you use an apply to each action. This is because the Variable needs to be locked for each iteration.

 

Secondly, you may find that using the Microsoft Graph / SharePoint API with a $Batch command will run faster, you can feed in all the record changes in JSON in a long string (upto 20 recordss a time) and it will do all the records in one hit, and each hit takes a fraction of a second. My experience with this has been really positive.

https://docs.microsoft.com/en-us/graph/json-batching

 

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,898)