Why is there a performance difference between a commit with and without events, even if no events are specified?

4
Hi All, Today we experienced a performance difference when committing a large number of objects (around 3000). In our current situation, it takes around 5 times longer to commit a list with events if we compare this to the same action without events. The entity itself has no events specified. With Events: Without Events: Is there anyone who can explain this behaviour? Especially because the developer rules are telling us to use the 'without events' boolean only if you really want to disable the events for this action, I don't think this should have a negative performance impact. Best, Jeroen
asked
3 answers
2

Internally data validation is performed as an event in case of a regular commit.

Committing without events will not do this validation, this probably explains the difference in performance.

answered
1

Jeroen,

My guess would be that even though there are no events on this entity, there is still processing required to check for events.  Perhaps it is the case that each object is checked for events.  If so, it would seem to be a pretty easy change for Mendix to make so that each object is not checked for events if the first object has no events.

Perhaps someone from Mendix can fill us in on how this works.

Mike

answered
0

@OP: What do you see when you view the database queries?

Are you commiting new objects or changing existing objects?

This difference would make sense if you're changing existing records, as without events you would expect the runtime to send a bunch of updates in a single sql statement, but if it has to handle events for each change it will send a single sql statement for every records. And yes, this could be optimized away, but I would not be surprised if it isn't.

answered