Hello
I am a new hibernate user and I noticed that the loading of the
mapping takes currently ages. I have only 30 mapped classes and every
time running my test application takes approx. 2-3 mins just to load
the mapping. This is currently not really acceptable if you like to do
some rapid devlopment. Are there any similiar experiences and some
workarounds?
I saw that the same question had been asked once for hinernate 2.0 (see at the end of the message). There was the solution to use another
cglib.jar , I tried with the newest one v2.1 which is available at
cglib.sf.net but this did not change the behaviour.
Has someone other experience and find a solution for my issue?
Thank you
regards
Mark Egloff
My current java code for loading the configuration
--------------------------------------------------
public static void main(String[] args) throws Exception
{
Configuration config = new Configuration().configure(new
File("hibernate.cfg.xml"));
sf = config.buildSessionFactory();
session = sf.openSession();
System.out.println("start...");
...
}
copy from the other FAQ Hibernate 2.0
--------------------------------------
Hibernate startup is slow, what can I do?
I just discovered the new cglib version available at cglib.sf.net.
Using the new library has cut my Hibernate startup configuration times
from sometimes 3 minutes (I had over 70 persistent classes) to nearly
nothing. This has been a godsend, given the nature of the app is that
it has to be restarted for every code change -- debugging could be a
nightmare.
If not allready done could you (Gavin) start packaging this newer
version with Hibernate -- it's a real time saver.
Luke Monahan
You need to remove bcel.jar from classpath and use asm.jar for
performance ( BCEL has priority in cglib 1.0 ). We will drop BCEL in
the next version.
Juozas Baliuka
|