+ Start a Discussion
Jung MunJung Mun 

# workflow versus one process builder in exchange of performance

Hi! Our org has 50+ workflow rules assigned to one custom object that I made a consolidated version with one process builder instance. After finishing with sandbox testing and on debug testing, business logics that are built with one process builder consumed more characters and CPU time when I executed one condition to meet one criteria. 

Process builder is .5-1 second slower than the workflow and runs 100,000 characters more. Which one is better? having 50+ workflows or slow performance? Is there any third solution?




Jakub Kołodziej 7Jakub Kołodziej 7
Process builder is mainly used to avoid use of multiple workflow because one workflow can have only one condition and criteria action but one process builder can have multiple if/else condition.
So workflow will be faster as having only one criteria to match and execute immediate action but suppose if you set time based action then situation will be different.
Process builder allow you to update child record where as worflow does not.
Process builder have to traverese to the child records by checking the criteria on the parent which is even not possible in workflow.
Process builder can call your apex classes but workflow doesn't.
If you run a controller from process definetly it take some time to execute.

Note: Again these comparison are based on some action there not oiverall performance, if you select outbound message in workflow which you can't in process builder then might be get different performace.

I'm not sure about your test which says that workflows are faster than processes - i mean not in every situation.

+ remember that workflows are executed before processes:
Jung MunJung Mun

Thanks Jakub. I ran a comparison test - executing a simple action with workflow and process builder. The performance gap is very narrow for executing one criteria. When there are 20 workflow rules compiled in one process builder, it was definitely not a brilliant solution to improve the slow performance. This blog gave us an insight and we plan on turning process builder rules to apex. https://medium.com/@RogerMitchell/performance-comparison-between-process-builder-and-apex-triggers-e4a1f455f9c1