How can I increase the speed of a workflow?

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

Kyle : How can I increase the speed of a workflow? Combine all the steps into one?

Pravin Savkar : Hi - combining steps likely won’t reduce the execution duration. One thing you can do is to increase the memory for your workflow from the settings tab. That increases the virtual compute proportionally, and you may observe a noticeable speed increase (up to a certain point). We recommend experimenting with the memory settings to find an optimal setting.

If you can provide more context about the use case we may be able to provide more guidance as well.

Kyle : Couldn’t find the settings to increase memory, but I’m guessing the bulk of my compute time is coming from a for loop that calls fetch requests.

I tried to use Promise.all() (not sure if that’s faster), but it may have triggered that “code block tried to finish before it was complete”-type error

Kyle :

Nghia Nguyen : the memory settings are in the Settings tab of the workflow page:

Nghia Nguyen : You can also set other neat things like max timeout and parallelism controls here.

Nghia Nguyen : I’m not sure what exactly you’re trying to do with looping through all the emails, but if possible maybe cutting down the loop by utilizing a bulk action call would help (if your API endpoint supports such an operation)