cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jeneaMD
Helper III
Helper III

Flow running slowly

Hello all,

 

I have a pretty complex Flow that is running correctly, but very slowly.


Purpose of the Flow: to check 170 rows (unique values) from an Excel worksheet in a document library where are 400 folders and if the unique keys from Excel are matching with the unique keys from the name of each folder -> then to update Excel row with the hyperlink of the corresponding folder if no -> to update Excel row with the text "Item not found" . The problem is that for doing these steps Flow needs about 2 days, that I consider is enormous:
1.JPG

 

Flow looks like below:

3.JPG

4.JPG5.JPG

6.JPG

 

Does anyone know how can I optimize the mechanics of the Flow, in order to reduce the running time?

Any help would be appreciated.

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions

Thank you, @efialttes for suggestions, but I think a found the appropriate solution.

I will switch to OneDrive instead of SharePoint, where I have the action "Find files in folder":

 

Capture.JPG

 

 

Instead of comparing each row from Excel with each name of folder in SharePoint, "Find files in folder" action from OneDrive is considerably faster.

Thank you!

View solution in original post

10 REPLIES 10
efialttes
Super User
Super User

Hi!

Flows with nested Apply to Each's + Condition inside indeed have a poor performance.

I would replace 'Apply to Each 2' and use 'Filter Array' instead. After 'Filter array' you can add a Condition to evaluate if nr of matches is greater than 0 by using the following expression:

 

 

length(body('Filter_array'))

 

 

Then on the true branch of this condition you can apply your logic (Get folder metadata etc), also on the false branch (Update a row 2 etc)

 

You can also consider to activate 'Apply to each' paralel execution

https://powerusers.microsoft.com/t5/Power-Automate-Community-Blog/Degree-of-Parallelism-in-Power-Aut...

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



rsaikrishna
Community Champion
Community Champion

Also, make sure the document library columns are Indexed Columns if they are used in Queries from PowerAutomate actions.

 

Hi @efialttes,

If you mean like this:

3.JPG4.JPG5.JPG

 

Unfortunately, it does not bring any modifications in running time.

Or I understood something wrong?

Thank you @rsaikrishna.


I have 4 columns all of them where indexed by me some hours ago and still no changes:

 

2.JPG

Hi!
I am afraid I shoud be more precise in my initial suggestion:
"I would replace 'Apply to Each 2' and use 'Filter Array' instead. After 'Filter array' you can add a Condition..."
You should assign the same input to your Filter array than the one currently assigned to 'Apply to each 2'. And remove 'Apply to each 2' also.
It will probably take you some time to convince Flow editor.
Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Thank you, @efialttes.

 

For me, it will be nice to have it now, but as I understood in this moment it's not possible to make my Flow faster.

Wai, wait, wait

An alternate easy approach to test

Did you tried to activate 'Concurrency' in your first 'Apply to each'? JUst give it a shot to see if iperformance gets improved

https://powerusers.microsoft.com/t5/Power-Automate-Community-Blog/Degree-of-Parallelism-in-Power-Aut...

The 'Filter array' approach is a bit complex to implement since Flow Editor with try to add an extra 'Apply to each'

Thanx!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Thank you, @efialttes for suggestions, but I think a found the appropriate solution.

I will switch to OneDrive instead of SharePoint, where I have the action "Find files in folder":

 

Capture.JPG

 

 

Instead of comparing each row from Excel with each name of folder in SharePoint, "Find files in folder" action from OneDrive is considerably faster.

Thank you!

Wow.... Great job, @jeneaMD ! And, thanx for sharing!

I am sure other community members facing this issue in the future will find your solution so clever and so useful, the first one  me!

You guys make this community great!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



takolota
Memorable Member
Memorable Member

For anyone who wants something over 100x faster and more efficient at updating Excel rows, check out the new Batch Update Excel template:

https://powerusers.microsoft.com/t5/Power-Automate-Cookbook/Batch-Update-Excel/td-p/1624706

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (1,728)