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 / Flow takes a lot of ti...
Power Automate
Answered

Flow takes a lot of time to process a simple condition

(0) ShareShare
ReportReport
Posted on by 65

I have a flow where I update a task when I receive an update from Azure DevOps. It used to work great but now, I noticed that I get a long time of processing on tasks that shouldn't take long. For instance, I have a condition where I determine if a workItem relation is a parent (reversed) one. The condition itself is:

@equals(items('Find_WorkItem_Parent')?['rel'], 'System.LinkTypes.Hierarchy-Reverse')

Just this condition takes about a minute to evaluate! I don't get it. Any idea anyone?

Categories:
  • Ed Gonzales Profile Picture
    4,531 Most Valuable Professional on at

    @nicolasdb 

    Hi there.  It might be the variables slowing things down.  Check out John Liu's video from the Online Flow Conference:

     

    John Liu | 5 Keys to make your Flows run Insanely Fast – Session 18 

     

    Keep us posted.

    -Ed-

     

    If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

     

  • nicolasdb Profile Picture
    65 on at

    So you think it's only because of the variables? Kinda makes sense but I have to rework my whole Flow as it relies on them a lot. I guess you are right. Isn't it strange that variables are that slow?

  • Ed Gonzales Profile Picture
    4,531 Most Valuable Professional on at

    I know John is a big proponent of Compose, and he's shown me the performance differences, so I believe him.  The Flows I build aren't super complex, so it hasn't been an issue yet, but it made sense and probably couldn't hurt.

     

    -Ed-

     

     

    If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

  • RezaDorrani Profile Picture
    12,145 on at

    Hi @nicolasdb 

     

    Microsoft Flow and PowerApps have been slow today. So that could be one reason that your Flow has been taking time (assuming this was running fast earlier)

     

    the screenhsot shared shows a case which was false, did you check and see the true case and how long the actions take then

    The GetParentWorkItem might be the one taking time to respond 

     

    Regards,

    Reza Dorrani

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

  • nicolasdb Profile Picture
    65 on at

    Maybe that explains. I found another example where there is some processing after the evaluation of a condition:

     

    Annotation 2019-09-20 084505.png

    The evaluated condition looks like this:

    @Or(and(and(equals(body('Parent_WorkItem_Details')?['fields']?['System.WorkItemType'], 'Projet'),
    	not(contains(body('Parent_WorkItem_Details')?['fields'],'AgileDev.AcombaProjectID'))),
    	not(or(equals(body('Parent_WorkItem_Details')?['fields']?['System.State'], 'Closed'),
    	equals(body('Parent_WorkItem_Details')?['fields']?['System.State'], 'Removed')))),
    	and(equals(body('Parent_WorkItem_Details')?['fields']?['System.WorkItemType'], 'Client'),
    	not(equals(body('Parent_WorkItem_Details')?['id'], '217'))))

    So it's similar and I don't quite understand why it takes so long to complete. After watching the video of John Liu I think I might be able to convert some variables to use compose instead but not all of them, not simply I mean. Complete rework of my logic and loops would need to be done for that...

  • Verified answer
    nicolasdb Profile Picture
    65 on at

    An update on my situation. I completely modified my flow to use Compose instead of variables and got execution time down to a few seconds instead of many minutes overall. I kept variables for clarity for general settings for my flow but not for variable data.

     

    Thanks all!

  • nicolasdb Profile Picture
    65 on at

    Another update! I tough everything was fine but I got another situation, even using mostly Compose actions instead of variables. The only variable I use is a list in read only for my Apply to Each.

     

    Clipboard - 26 septembre 2019 11_15.png

    And here is the code in the "If may be applied" condition:

    and(
     or(
     equals(outputs('LastTimeCampEntryID'), 0),
     greater(int(items('Apply_to_each')['id']), outputs('LastTimeCampEntryID'))
     ),
     or(
     equals(body('WorkItem_JSON')?['fields']?['Custom.TimeCampAppliedEntryIDs'], null),
     not(contains(body('WorkItem_JSON')?['fields']?['Custom.TimeCampAppliedEntryIDs'], string(items('Apply_to_each')['id'])))
     )
    )

    Nothing special, really. Any idea anyone? It's like the process is suspended for a while and then resumes whatever it was doing. It's weird.

  • nicolasdb Profile Picture
    65 on at

    Anyone has an answer to my last post? I don't quite understand how a simple condition could take so much time to resolve. Here's another one:

     

    https://i.imgur.com/1oZOA4z.png

     

    How am I suppose to find where the problem is? I suspect the individual reported task time isn't reliable and that my problem might lie in an http request or, that my whole Flow process gets jammed at some point and thus ending taking so much time to complete. Any idea?

  • chico Profile Picture
    638 on at

    I'm dealing with this myself now....
    trying to see if there is any difference/improvement in using a Switch or a Condition.

  • jsenger Profile Picture
    4 on at

    Hello - I am also coming across this same problem. The condition I have is taking > 1hr to supposedly execute a single contains() function.

     

    Has anyone found a root cause/resolution for this?

    Capture.PNG

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 389

#2
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard