Theoretical API-WF Performance Question

Hi all,

As I approach a new project that requires API workflows on lists, I’m trying to decide how best to build those workflows for optimal performance.

Lots of users will be scheduling these workflows all day, every day. I need it to be reliable.

These workflows will be semi-complex with many steps & changes to the data that goes through them.

Thus, my question is essentially this:

In general, is it better to have 1 workflow with 10 actions or 10 workflows with 1 action each? (assuming workflow #1 would schedule workflow #2, and then #3, etc…)

Thanks for your insights!

Usually one workflow with more actions is better, but obviously nobody should insanely try to knot all app or page actions into one single workflow with 10,000 actions.

There are many details to it, but I stick to some essentials like keep it as lean as possible, few searches and conditional checks as possible and when these are needed, as simple as possible.

Also database design is key if you want to build efficient workflows, on my view a good database design comes first and workflow design comes second.

1 Like

Thanks @vini_brito - good insights. Agreed on DB Design. Throughout my time Bubbling, I’ve learned some database design lessons the hard way - trial & error!

Me too buddy, me too!

1 Like

Ok so quick follow-up question: I’ve read on the forums about sometimes API workflows failing because data “bumps into” each other or when the same record gets edited simultaneously.

Is this an issue only for data? Or could it be for workflows too?

For example, if I had 1,000 records (500 “type-a” and 500 “type-b”) that needed to be run through an API workflow, would it be wise to have two separate workflows (a “type a ONLY” workflow and a separate “type b ONLY” workflow) even though those workflows are nearly identical, with just a few minor differences?

In other words, would cramming 1,000 records into a single, more efficient workflow ever have unintended consequences of having too many records run through it at a time?

Or am I thinking about this the wrong way entirely?

Hope this made sense! Thanks

Well I haven’t touched that part yet, of scheduling workflows on larger datasets, so I don’t really know, but I’ve read about that and people usually report much larger speeds when scheduled workflows run in parallel, that means if you trigger at the same time the two workflows to run through 500 items each, then your 1k items will be processed faster than setting only one workflow for it to run through the entire 1k items.

1 Like

@vini_brito - yeah that would make sense. @neerja can you confirm if this is generally true?

@richardsonjj36 If the workflow is on a list, each item is scheduled and executed independently where multiple runs can be executed in parallel. However, if the list is large and your app is maxing capacity, it makes sense to break the list into smaller batches to manage capacity.

1 Like

@neerja ok thanks.

What about if multiple users of my app schedule different lists @ the same time on the same API workflow?

In that scenario, would it be more optimal to have different API workflows that do essentially the same thing available to be scheduled, or will 1 API workflow suffice?

Thanks