Question

when loading lots of objects, I get a OOM-Exception. After analyzing the heap with a profiler, I see that there's a lot of memory in org/hibernate/util/IdentityMap which references a LinkedHashMap containing thousands of Entrys. What are those objects used for?

I'm really thankful for all kinds of information...

alt text

Was it helpful?

Solution

This is the entity cache of the persistence unit. Also known as first-level cache. All entities loaded from the database are kept in this cache so subsequent requests for an already known entity can be answered from the cache without issuing SQL queries.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top