This topic was automatically generated from Slack. You can find the original thread here.
Andre Brunetta : Hi, I’m experiencing a wide range of response times, from 1.5s to 18s without changing any code and also using the same payload (replay). Just wanted to make sure I’m not doing anything wrong here… is that normal / expected?
Dylan Sather (Pipedream) : Hi , are you making requests to third party APIs within the workflow? A lot of the difference in runtimes we observe are due to differences in the response time of HTTP requests. Is it possible a service you’re using simply took a long time to respond in this case?
Dylan Sather (Pipedream) : Pipedream workflows are subject to “cold starts”, but that time shouldn’t be reflected in the total time you see here. In general, we do observe a large distribution of response times from APIs, and that is also expected. e.g. I have a workflow that talks to Slack and most requests take less than 1s to complete, but some take upwards of 20 seconds, and some even time out (for the same API call). This is just the nature of third party APIs.
Dylan Sather (Pipedream) : If you’d like, you can add step-level timing within each step, to assess what specifically is taking the largest sum of time:
this.start = (new Date()).toISOString()
// your code
// ...
//
this.end = (new Date()).toISOString()
Dylan Sather (Pipedream) : if you observe anything odd there (i.e. something that’s not explained by a request to a third party API taking a long time), feel free to share your workflow with dylan@pipedream.com and I’m happy to dig in
Dylan Sather (Pipedream) : Believe it or not, that’s expected and by design! Destination delivery happens asynchronously, outside of your workflow, to keep the execution of your workflow fast.
Dylan Sather (Pipedream) : That’s most impactful for sending HTTP requests (when you use $send.http() - https://pipedream.com/docs/destinations/http/#using-send-http). When you don’t need to access the HTTP response within your workflow, you can send the request to the service async using $send.http(), so your workflow won’t wait on the HTTP response.