https://issues.apache.org/bugzilla/show_bug.cgi?id=57251

--- Comment #9 from Mark Thomas <ma...@apache.org> ---
The fix for bug 57472 might shave a few seconds of the deployment time but it
doesn't appear to make a significant difference.

The fundamental problem when running from a packed WAR is that to access any
resource in a JAR, Tomcat has to do the following:
- open the WAR
- get the entry for the JAR
- get the InputStream for the JAR entry
- Create a JarInputStream
- Read the JarInputStream until it finds the entry it wants

This is always going to be slow.

The reason that it is fast in Tomcat 7 and earlier took some digging. In
unpackWARs is false in Tomcat 7, it unpacks the JARs anyway into the work
directory and uses them from there. Performance is therefore comparable with
unpackWARs="true".

I haven't made my mind up what is the right thing to do here.

On one hand, unpackWARS="false" really should mean exactly that. Not "don't
unpack the WAR into the appBase but so unpack the JARs in to the work dir". You
might as well just use unpackWARs="true".

On the other hand, the performance is clearly worse. It was a factor of 3 on my
machine but clearly it varies from machine to machine. It looks to be in the
range 3 to 10 times slower - which is not good.

To throw something else into the mix, static resources will be cached in memory
in both cases for improved performance.

As I ponder what to do about this I do have one question. Why do you want to
run with unpackWARs="false"? What is the use case?

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to