apex-enterprise-patterns / fflib-apex-common

Common Apex Library supporting Apex Enterprise Patterns and much more!
BSD 3-Clause "New" or "Revised" License
906 stars 515 forks source link

How to handle growing number of loops #335

Closed reignman5 closed 3 years ago

reignman5 commented 3 years ago

Hi,

lets imagine I have a domain class with 10 different methods I want to call from the onBeforeInsert method. My problem now is that with every new method Im adding to the onBeforeInsert method, I am also creating a new for loop. Because as I learned every method should just do one thing.

Is this gonna be problematic in the future regarding perfomance? Are you handling it differently?

daveespo commented 3 years ago

@wimvelzeboer gave some guidance on this topic over on #332