4

In a current implementation, I am running into performance issues, the issues happen because there are a lot of process builders on several objects.

I am creating multiple records at the same time, through a managed package, this in turn causes both the created records, as well as every related records to be updated.

Due to the large volume of process builders on these related records and the records I am creating, I am seeing a huge rise in CPU time, causing a lot of timeouts. I have already tried optimizing the process builders, by making sure the actions only execute if a checkbox is true. The biggest amount of time however, is used by evaluating all the nodes.

I was wondering if there is a way, to prevent process builders from evaluating all together.

Should all the logic be reexamined, or are there simple fixes that can drastically reduce the time needed for evaluating everything.

1
  • consider moving some of the big performance hit PBs into triggers
    – cropredy
    Oct 11 '17 at 0:43
1

To be honest, its a fact that processes are CPU intensive. Here, for example, is a community request to improve their performance.

Given the case that you have such a big amount of data and the processes are being run so often, I'd recommend migrating all that logic to a trigger where you have a better control of how things are done. It's true that declarative solutions are always better in the Salesforce platform, but sometimes, just like now, a trigger might fit the solution better.

Now, where you to stick with the processes, then you could consider unifying them as much as possible, that is, reducing the number of processes in exchange of making certain processes have more conditions. That's also a best practice since the order of execution of processes, just like the triggers, isn't guaranteed.

0

I agree w the above answer that a trigger is likely better.

One additional note, as illustrated on this post, is that it is much less efficient if you have lots of actions with criteria on the actions vs criteria in the nodes. If you are doing this then redesigning your processes should help significantly.

Also if you have recursion enabled on the process that is much less efficient.

Finally, there is this post which has some pretty sophisticated design patterns for process builder. I don't know if they will help for your use case but worth a look.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.