lukasz-antoniak/hibernate-core — comment on commit 9f39a4a98d34e119f37c90d3953fe083c795bf6a
File:  line 0
By gbadner:

I haven't looked very deeply, but I think it would be more efficient to add an event and listener that evicts all non-dirty entities from the session cache. The advantage would be that the "pre-flush" code would be executed once, rather than for each entity that gets checked for dirtiness via Session.isDirty( entty ).

The code for checking entity dirtiness looks good, but I'd have to spend more time digging into the code to be sure.

Regards,
Gail