Costin Manolache wrote:

Remy Maucherat wrote:

From my profile, the bottleneck for the startup time is XML parsing and accessing entries in JARs (we can't do anything about that), with a


Did you try a pull parser ? kxml2 is really fast and only 42K :-)

The other approach - which I think may have a lot of benefits - is to use some caches. For XML - you would need to make few of the classes serializable, or create few wrappers that are serializable. And whenver a change is detected - reparse. Not trivial code, but you can get a lot
in cutting server.xml and web.xml parsing.

The time is mostly parsing web.xml. However, it's nothing when compared to starting certain webapps (such as the admin webapp), where *one* webapp takes more time than starting up the rest of Tomcat (including all the simple webapps, JMX and the modeler descriptors, etc).


The other big problem is the (needed) JAR parsing for TLDs during the deployment of a webapp.

Classloding and XML parsing are negligible when compared to these two things. So why bother ?

If I do the server.xml persistence that I envision, I'm using DOM for everything anyway.

The jar index is also quite usefull IMO (  is it implemented in
WebappClassLoader ? I can't find any code ).

No, there's no index. I think it could be useful (mark that some packages are available in some JARs).


The thing I was planning to try just in case for StdCL was to load everything on creation of the classloader. Since in the end most classes will be loaded on startup, it would remove the need for syncing.

Rémy


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to