Are Server-Side Actions bugged or something? They are too slow to do much of anything interesting.
Take for example, this minimal function in my blockbuster server-side action, “Return 5”:
function(properties, context) {
return {value: 5}
}
This function takes SECONDS to return the value to the workflow. Seriously, what is up with that? In fact, we can call the same almost-not-even-a-function running on Webtask, through the API connector and get the value back faster.
It’s super-disappointing. My idea with SSAs was to build a ton of nifty workflow building blocks, some of which leverage libraries, but some of which are relatively simple and rely on no libs at all.
However, they all have this ridiculous startup overhead. And, so, you can’t viably chain these actions together in a workflow to d o cool new things… the workflow ends up taking way to long to complete.
And the spin-up time is just insanely inconsistent. Sometimes, an SSA will fire rather quickly. But sometimes it just taaaaakkkkeeeesss reeeeaaaalllly llllloooooonnnggg…
And it’s completely unpredictable. I caught it in the act in this video:
Here’s a demo of “Return 5”: First, we call it over on Webtask via the API connector (pretty darn snappy!). Then we call the SSA “Return 5” directly in response to a button click. Then we call the SSA in a Custom Event workflow fired off by a different button click. Then I do the SSA clicks again…
The first SSA click in this video almost seems like it’s getting hung up… But no, it’s just taking many seconds to complete. And it’s not like, once the function is instantiated that repeated calls to it go faster. It’s just completely unpredictable. Watch:
@Bubble, any input on this? Again, this function literally asks nothing of the properties or context objects and it loads no libs. It just returns with an integer.
This can’t possibly be the design intent of SSAs, can it?
(Also: For anyone wondering – Obviously, this is in a free-level test app. But I get exactly the same type of behavior in my production professional plan app. It’s just miserable.
On the PLUS side: Including even huge NPM libraries does not add appreciably to the spin-up time. It’s totally weird. It’s like, “yeah, we have to wait 20 seconds to return your integer to you, but we can load moment-timezone in 2 ms. Hang on!”)