Jira issue originally created by user @beberlei:
Currently both onUpdate lifecycle events and event listeners trigger the recomputeEntityChangeSets method.
I would suggest to change the event listeners to only recieve a reference of the changeset and not computing the differences for each affected entity. This could improve performance considerably in the onUpdate event case and would be more helpful for users to understand how limited the onUpdate event listener really is.
Comment created by @beberlei:
Another valid approach would be to require an explicit call to recomputeEntityChangeSets from an onUpdate listener.
I think both use-cases could be supported.
This would be a BC break, so implementation before Beta 1 seems a necessary must
Comment created by romanb:
Well, ok, we can still have BC breaks during BETA though, only once we hit RC the API is frozen.
Attached is a proposed implementation example
Implemented, notes in UPGRADETO_20:
## Change of PreUpdate Event Listener
Event Listeners listening to the 'preUpdate' event can only affect the primitive values of entity changesets
by using the API on the `PreUpdateEventArgs` instance passed to the preUpdate listener method. Any changes
to the state of the entitys properties won't affect the database UPDATE statement anymore. This gives drastic
performance benefits for the preUpdate event.
Issue was closed with resolution "Fixed"
Imported 1 attachments from Jira into https://gist.github.com/9c43acb2ee7307de0296