2011/4/20 <ma...@apache.org>: > Author: markt > Date: Wed Apr 20 11:28:53 2011 > New Revision: 1095367 > > URL: http://svn.apache.org/viewvc?rev=1095367&view=rev > Log: > Switch JAR scanning to use JarInputStream rather JarFile for significant > startup performance improvements >
> + <fix> > + While scanning JARs for TLDs and fragments, avoid using JarFile and > use > + JarInputStream as in most circumstances where JARs are scanned, > JarFile > + will create a temporary copy of the JAR rather than using the > resource > + directly. This change significantly improves startup performance for > + applications with lots of JARs to be scanned. (markt) > + </fix> > + // JarURLConnection#getJarFile() creates temporary copies of the > JAR > + // if the underlying resource is not a file URL. That can be > slow so What URLs are there? Why aren't they file ones? A zip file has "central directory" i.e. master index at the end of the file. IIRC when you are using random-access methods of Zip file, that index is loaded into memory once. Scanning the file sequentially does not use the index and I think it will be slower. Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org