tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <>
Subject Re: Resources - Performance (caching)
Date Thu, 20 Sep 2012 17:31:07 GMT

Konstantin Kolinko <> wrote:

>2012/9/20 Mark Thomas <>:

>> A simple JMeter test requesting the same static file over and over
>> shows that the original DirContext implementation is around 5 times
>> faster than the new Resources implementation.
>> I think the do we need caching question has just been answered firmly
>> Using YourKit, I can see where problems are. I can improve the new
>> implementation to only 3 times slower with some very simple caching
>> within a single request but for improvement beyond that we will need
>> caching of resources across requests that includes caching of
>> I plan to look at this next.
>Hi, Mark!
>I suspect the slowest scenario will be when a file is served from a
>META-INF/resources directory of a jar file.

Maybe. The main issues with simple static resource were lots of reads of the last modified
time followed by reading the content. The factors that make that slow may be different for
JARs. I expect JARs will have different but equally significant issues. I agree JARs are likely
to be worse but I haven't tested them yet.

>I wonder what the numbers will be and whether there is already some
>caching to prevent re-opening the jar file on each access.


>There is a related issue in WebappClassLoader that I filed here:

I'll be interested to see what sort of difference that makes.

>I think I'll have time for more detailed review on this weekend.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message