Over the last few months, I’ve noticed that the compute time used by relatively simple actions has gone up significantly, and it doesn’t really make any sense. Even just a snippet that does nothing but declare a few variables takes multiple seconds. It makes no sense that declaring variables takes that much time, yet almost all of my workflows have this issue, with simple tasks like that all taking 3-5 seconds. What’s going on here, and how can I reduce this?
I have these connected to a Discord webhook, if that has any influence on it, but even without sending anything to the webhook (without doing anything with the webhook at all), it’s still at least 3 seconds.
@matirion thanks for reaching out. Have you timed the individual steps, and are you seeing specific steps that do little work take a long time? Or is the workflow as a whole taking longer than expected to run?
Is the length variable? That is, are you seeing some workflow runs work fine, and others take a long time, or are they all longer than expected?
Finally, would you mind clicking the Share button at the top-right of your workflow and share it with dylan@pipedream.com so I can take a look?
It’s rather consistent, with a few exceptions. Even a workflow without any code other than declaring variables (or even no code at all) takes a few seconds. I tested that out before, and that’s what’s confusing to me.
The ones that have issues are the ones that receive data from reddit through IFTTT (for the most part). Somehow, the one that gets it from Twitter (also through IFTTT), does not have the same issue most of the time with few exceptions.
Initially, when I first started using this, it was all around the 300-800 ms range which the twitter one still has, but it’s gone up over time. I have added you to a workflow with the issue.
Seeing this issue on my workflow as well. Adding console.time(|Log|End)
invocations now to get an idea of which parts are slow vs. the whole, but judging from the timings of requests that happen within a few minutes of each other, this appears to be a result of the workflow starting when its container is coming from a cold-boot vs. warmed up. The initial invocation after a period of downtime is typically taking ~2.5..4.0
seconds, with subsequent invocations each finishing in ~0.4..0.6
seconds.
H’ohyeah, the ~3.0 seconds seen in some invocations is absolutely cold boot timing. It doesn’t show up in the console.timeLog
and console.timeEnd
calls at all, and the final timeEnd
calls consistently show my workflow body taking subsecond times to completely run.
That seems like a backend issue then… Hopefully they can fix this, because the time really adds up. Would explain why the Twitter one doesn’t have the issue, as it’s fires very frequently in comparison.
First, I doubled both of your daily compute time quotas to help reduce the impact of this.
This is just an issue on cold starts, but you’re not actually charged for the time it takes to spin up the environment. There are a few things we do after the execution environment has been instantiated, and I’m looking into it to see if we can reduce that timing. This may take some time to address, but I’ll update y’all as soon as I have more information.
Alright, thank you! I’ll wait to see what changes then. Glad to know it’s being worked on, as it’s a bit much.
Wow. That’s really generous of you, @dylburger. In all honesty, that’s above and beyond the level of support I would’ve expected for being on the free tier of as useful a service as Pipedream.
I only noticed this because a button on my client’s website that invokes a Pipedream workflow (as part of a bigger workflow) wasn’t visually responding to being clicked, and while I worked on toggling the button’s [disabled]
state, my curiosity had me search for where the delay might’ve been coming from. In terms of usage, my client’s website calls through to the workflows I’ve put together with a very slow trickle of traffic every month. I don’t have any concerns about them exceeding the compute time limit, even if every call ran with timing statistics on par with the cold-boot runs.
I had completely forgotten this, but the timing we display there is the end-to-end time it takes to execute the event, which includes:
- The time it takes to issue a request to invoke your function
- The time it takes to spin up a new execution environment (“cold start” time)
- The time to run your workflow (this is the only compute time you’re charged for)
- The time for the function to return its logs / data to be displayed in the UI
Since a lot of people fall into @thepeoplesbourgeois’s camp (you’re testing a workflow triggered on HTTP requests and notice the delay), we want to show the true end-to-end time it took to process your request.
If I had forgotten this as a founder, it’s obviously going to be confusing for others! I opened an issue on our backlog to better clarify what this time means in the UI.
We’re also working on a new version of the workflow builder that will show step-level timing, so it should help clarify how long individual steps take vs. the end-to-end time. I also shared this thread with the team so they’re aware of the confusion.
This is seriously some of the best technical support I’ve seen come out of a company, and it’s coming from the co-founder.
If this keeps up, I sincerely might have to try convincing you to hire me.
I do agree on that, it’s amazing. If I didn’t need a job that let’s me move to Omaha, Nebraska specifically (to live with my fiancee until we feel it’s right for us to marry), I would apply for a job myself… Visa sponsors in a specific area are few and far in between though.
Love it, I appreciate that! We put a lot of effort into our support so it’s really kind of y’all to give us that feedback.
We are hiring for three positions (see the bottom of that blog post) if you ever want to chat or if you know friends who would be a good fit.
As much as I’d love to, I already saw the blog post, but visa sponsorship is listed as not being available. Unfortunately, that means I’m not a suitable match for a position, because my main reason for looking for a new job is that I want to be able to move to live near my fiancee… You’d think that with over 10 years of experience, it would be easier, but barely any company offers sponsorship and the ones that do get swamped.
I don’t even need vacation, or any benefits, or even great wages, because for me the only important factor is that I can be with the person I love. Getting a bit off-topic though.