I have noticed that many of the Apex triggers in my org update records even when there are no substantive changes to those records. For instance, consider a trigger that sets field values on an object based on some criteria, then makes an
update call to commit those values to the database. In practice, this trigger commonly assigns the exact same values that already exist on the record, so it ends up making a DML call when no DML is needed -- or including more records in an update list than need to be included.
To improve performance across the org, I would like to retrofit all my triggers to avoid these kinds of inefficiencies, probably via some type of utility method. Has anyone else has tackled this kind of problem, who can recommend an efficient pattern to address it?
Note: I understand that it is possible to check existing field values one by one, but to me this seems like an unacceptably verbose approach.