Just to let you know - and keep a record of the attempt.

I did a small experiment, making all objects in tomcat Serializable
( a bit of perl ) and saving the state just before engineStart() 
( when all the state is stable ).

Then at startup, detect if tomcat.ser is available and load it.

I counted the startup time in both cases - and the diference is not very 
big ( 10..20% ). The main reason is probably the fact that we save much 
more than we need to. That could be fixed with "transient" declaration or 
custom savers, but it's more work than it's worth it.

The experiment had 2 goals - improving the startup time, and providing
a way to "suspend" and "resume" tomcat in a stable state.

I think there are better/cleaner ways to do the second ( with a module
that will save all the state and maybe an additional hook ). 

For the first I'll reuse some of jasper and generate a EmbededTomcat-like
file from server.xml, etc. Most of the startup time is spent in
introspection, and this will also reduce the requirements on the 
JVM ( some embedded devices are not very good at serialization or 
introspection ).


Costin

Reply via email to