dev@glassfish.java.net

Re: The *real* classpath of app server VM?

From: Scott Oaks <Scott.Oaks_at_Sun.COM>
Date: Mon, 03 Apr 2006 11:27:25 -0400

> > This is very confusing and might be having performance penalties.
> I agree and would include this in the issue. I don't think this would
> cause any discernible performance issues though.

Ah, but it does. Classloading is dependent on the number of jar files --
not just in the actual classpath but in the total number of jar files
that all the classloaders use (so by whatever means things like
appserv-rt.jar, appserv-cmp.jar, appserv-ext.jar and so on get added to
the classpath, the fact is that there is a lot of them).

So this has a huge effect on startup and deployment. We've long known
that if the appserver had only one jar file, we'd see better startup and
deployment performance. And adding files to the classpath will cause
regressions (when all the derby files unnecessarily got put on the
classpath, we saw a noticible regression).

In addition, certain runtime operations are affected by this. Whenever
classes are deserialized (in the ORB, in the JMS code, etc.) it has to
search through the classloader chain. The fewer jar files, the faster
that process will be.

-Scott