Peter M.Chen wrote:
> a real business project often contains 100 or more persistent class,
> now hibernate startup is very slow, normally spent 30 or more seconds.
>
> So I write a module to speed up it,
> only cache the config file path(.hbm.xml) of the persistent class,
> read and parse the file content until program using the persistent class.
>
> http://sourceforge.net/projects/hbn-dyn-mod/
I'm interested in speeding things up. Maybe you would be so kind as to
post a brief summary here and on the sourceforge site explaining what it
does and how it works.
Things I have tried to varying degrees of success:
* Buy faster hardware :)
* Make use of cachable hbm.xml files in projects that have the hbm.xml
file in the WEB-INF/classes directory, but sometime this is not possible
as hbm.xml are inside JARs.
* Make web-app ServletContextListener.contextInitialized() create a
background thread which creates the SessionFactory and once ready it
calls a notify callback chain to kickstart Session users.
* Use a separate web-app to build and keep the SessionFactory, so that
the web-app you are developing can be reloaded independently. This is a
little like JBoss AS hbm service (forgotten what its called) but for Tomcat.
Darryl
|