I'm trying to optimize some code and am going through some triggers. I'm wondering if there is a performance difference between
- running three methods in series - and in each one, I loop over Trigger.new twice to pull an Id and then update the record from the parent record - and
- combining the methods and looping only twice, but doing more script statements in each loop iteration
The total script statements executed will be identical. This question is specifically if the number of loops executing those script statements should have an effect on application speed.