What Causes the Extra Delay in the Execution of Parallel / If-Else Workflows in CRM?

This topic was automatically generated from Slack. You can find the original thread here.

hi all, i have an optimization question about parallel / if-else workflows and trying to better understand why some take so long. attached a photo of a snippet. the workflow is connected to a lead form and this part just creates a new business entry in the CRM. each block runs for about 1 sec, but the whole ifelse runs for about 34 sec. can you please help me understand what causes the extra delay?

Hey , does the workflow have any concurrency limits?

Could you share the workflow ID?

sure! onsubmit-lead-form-p_A2CZv27 and nope, i didnt set any concurrency limit. unless there’s anything in place by default

Thanks , I checked and actually the workflow has concurrency limits in place — but I don’t see the steps you shared in the screenshot, is this the correct workflow?

Shoot my bad. It’s this one onsubmit-quick-add-freight-p_MOCp15p

These 2 are pretty similar in terms of functionality just minor differences and pretty easy to mess up. My bad!

Np, I looked at this one and see that most events take about 30~45 seconds to execute the whole workflow

but the whole ifelse runs for about 34 sec
You mentioned only the ifelse took 34 seconds, but that seems incorrect

Do you have a specific Event ID where that happened?

Yep. I think this is the one I took the screenshot in 2YMW0KWQ9YT7LHPE2NGERPP5VC1

This one took almost 2 minutes to run

Found it (FYI the trace_id is located in steps.trigger.context.trace_id, it has lower and upper case letters and is case sensitive, so kinda bad on our part that we display the trace in upper case where you found it)

I see this execution took longer in some parallel steps for some reason

Realistically it is hard for us to know exactly why, since AWS Lambda is the one that spins up a function when they want, it could be due to the load at the time

And it seems this one is an outlier (most took between 25 and 45 seconds)

Gotcha. I see. Sooo in that case there’s not much I can do about it on my end?

Correct