Why does my workflow take so long to run?

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

Max : I’m having trouble figuring out why this workflow takes so long to trigger sometimes. I’ve timed from the beginning of the 1st step after the HTTP API trigger step to just before the $end at the last step and it’s showing 2940ms for the event which shows 9726ms in the event log. Can anyone offer some advice?

image.png

Dylan Sather (Pipedream) : thanks for reaching out. There’s a little bit of Pipedream system time included in the time you observe in the inspector, which includes e.g. the time it takes to spin up the execution environment for the workflow.

The delta between this time and the time it takes for your code to execute is a known issue and we’re working to resolve it so that you only see the true time it takes for your workflow to execute.

Max : Yeah, that was sort of my conclusion from what I observed. I tried setting up a “warm” workflow, but doesn’t seem to make a difference.

Max : Anything else I can do?

Dylan Sather (Pipedream) : You’re doing everything right on your end, this is an issue we need to resolve internally. I’m discussing with the team now - appreciate you raising.

Max : Darn. The system time adding 7-8s sometimes is a real bummer, haha.

Max : That said, Pipedream has helped me develop some stuff that would have certainly been a lot more difficult otherwise, so really appreciate that. Great product. :slightly_smiling_face:

Dylan Sather (Pipedream) : would you mind clicking the Share button at the top-right of your workflow and share it with dylan@pipedream.com?

Max : Sure, will do.

Dylan Sather (Pipedream) : I was reminded by the team that the core reason for this delta is the work we do to download and install the npm packages you require in your workflow. Warming your workflow regularly may reduce the chance this happens, but occasionally, we’ll still have to spin up a new execution environment and setup all of the packages prior to executing the first step of code. Luckily, this shouldn’t happen on every execution, but I believe that’s the reason you’re seeing this delta on certain events.

Max : Ahh, okay, that’s helpful. I’ll see if I can optimize a bit based on that. :+1: