I'm using Hibernate 3.0.5 and I've run into a performance problem with Session.load when retrieving objects from the session-level cache. It seems the problem is that when running outside a transaction, each time an object is retrieved from the cache Hibernate iterates through every single item in the cache and sets the lock mode to LockMode.NONE. Is this step necessary, and is there any way to avoid it (other than only calling session.load inside a transaction)? It's eating up 33% of the time rendering one of my JSPs :(
|