web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Simple comparison take...
Power Automate
Answered

Simple comparison takes multiple seconds

(0) ShareShare
ReportReport
Posted on by 5

Hi,

 

I created a flow wich is triggert when as file is uploaded to Sharepoint.
Next a couple of conditions determine what to do with the file and the data in it.

First it checks the content-type, then the first line (column headers).

Both comparisons take 1 or more seconds, so far not a big deal, but then the flow starts ittarating all the lines in the file (about 5000 lines). On each row again a couple of comparisons take place like "is a column filled", "containes the colum a ; (multiple values)", etc. this to determine the values to use in a webservice. This webservice accepts a relative small amount of request per second / minute, so for now I limit the foreach to just 1 at a time.
All comparisons together take about 5 to 7 seconds for each line in the file. This way the flow runs a couple of hours, which is far to long especially knowing the most of this time is waiting for simple conditions like "[var] contains [char]"

setting the foreach to more then 1 could shorten the total time, but I can't get my head around a simple comparison has to take this long.

 

How can I speed up a comparison?

Categories:
I have the same question (0)
  • Verified answer
    eric-cheng Profile Picture
    5,171 on at

    Hi @MDeguelle ,

     

    Provided its not a latency issue and you cannot cut down the number of lines from 5000, you could look at enabling concurrency.  

     

    ericcheng_0-1634213344685.png

     

    Here are some articles that talks about it link and link.

     

    One thing to be careful about is if you are setting variables in each loop.  When you enable concurrency, they all run in parallel so it is possible for variables to get mixed up.  The workaround is usually to replace variables with compose actions.  

     

    --------------------------------------------------------------------------
    If I have answered your question, please mark my post as a solution
    If you have found my response helpful, please give it a thumbs up

    Connect on LinkedIn

  • MDeguelle Profile Picture
    5 on at

    Changing the concurrency did the trick, but indeed variables got mixed up.
    I'm going to exchange the variables with compose actions as you suggest.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 250 Super User 2026 Season 1

#2
Expiscornovus Profile Picture

Expiscornovus 222 Most Valuable Professional

#3
Haque Profile Picture

Haque 174

Last 30 days Overall leaderboard