tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: svn commit: r1095367 - in /tomcat/trunk: java/org/apache/catalina/startup/ java/org/apache/jasper/compiler/ java/org/apache/tomcat/util/scan/ webapps/docs/
Date Wed, 20 Apr 2011 15:51:29 GMT
2011/4/20  <markt@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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message