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

Notifications

Announcements

Community site session details

Community site session details

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

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard