Consider a session that has many entity list queries. Maybe in the 100s. The programmer usually knows if these session transactions are for read only, and could give a simple session.evictAll() command, which if properly implemented, would be o(1). The expected performance gain is that the under-the-hood session completion algorithm would not have to check all (possibly many) entities that are being tracked to see if they had changed.
There may be other advantages that users could come up with.
|