When deploying new apps (or starting up with apps deployed), each app gets a new ASURLClassLoader, and we spend a fair amount of time in ASURLCLassLoader.appendURL().
The time spent here is dominated by processing of the jmsra jar files, which contain many repeated and non-existent entries in the classpath; still, appendURL() blindly goes through all of them, regardless of whether they exist or have been processed before.
As an example, imqbroker.jar's manifest contains this classpath entry:
Class-Path: imqutil.jar imqjmx.jar ../imqjmx.jar ../../../share/lib/im
qjmx.jar jsse.jar jnet.jar jcert.jar ../imq.jar ../jms.jar imq.jar jm
s.jar ../../../share/lib/imq.jar ../../../share/lib/jms.jar imqjmsbri
dge.jar imqstomp.jar imql10n_server_ja.jar imql10n_server_zh_CN.jar i
mql10n_server_fr.jar imql10n_server_de.jar imql10n_server_es.jar imql
10n_server_it.jar imql10n_server_sw.jar imql10n_server_ko.jar imql10n
_server_zh_TW.jar imql10n_server_pt_BR.jar imql10n_server_lang1.jar i
mqbroker_ja.jar imqbroker_zh_CN.jar imqbroker_fr.jar imqbroker_de.jar
imqbroker_es.jar imqbroker_it.jar imqbroker_sw.jar imqbroker_ko.jar
imqbroker_zh_TW.jar imqbroker_pt_BR.jar imqbroker_lang1.jar
We need only one path to imq.jar and similar files; we're never going to find jsse.jar, jcert.jar, and jnet.jar in this directory, and to a large extent the internationalization files are never present in downloaded bundles. Even if we cannot completely remove the internalization entries (e.g., if it is too hard to have 2 builds, one with and one without the entries and put the correct build into the correct bundle), we still can clean this up significantly, because every jar file that imqbroker does include (e.g. imqstomp.jar) also includes all those same internationalization files in its manifest. They should be included only in one place.
We've run some simple tests cleaning up the manifests of imqbroker.jar, imqjmsbridge.jar, imqjmx.jar, imqstomp.jar to remove all the non-existent jar files but keeping (only one) set of internationalization files, and on simple startup and deployment benchmarks, this improves performance between 2.5% and 5%.