This week's book giveaway is in the
We're giving away four copies of a choice of
"Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac"
and have Joe Kissell on-line!
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Take Control of Upgrading to Yosemite
Take Control of Automating Your Mac
this week in the
EJB and other Java EE Technologies
EntityManagerFactory init creates excessive objects?
Joined: Mar 14, 2006
Aug 13, 2013 01:30:51
I am profiling my
web app with YourKit to reduce memory usage and I have found out that one of the biggest memory occupants is created by javax.persistence.Persistence.createEntityManagerFactory
Have a look at memory allociations tree:
Name, Recorded Objects, Size
) 390292 160876904
going into lower levels, I can see this:
org.hibernate.util.ReflectHelper.classForName(String) 60165 124122640
and it's 2 subnodes:
java.lang.ClassLoader.loadClass(String) 33334 37485640
java.lang.Class.forName(String) 26831 86637000
is this correct behaviour?
I agree. Here's the link:
subject: EntityManagerFactory init creates excessive objects?
Instances of string objects
String -memory address
difference between == and equals()
nodding my head for these (scjp)
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014