tomcat-dev mailing list archives

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


Konstantin Kolinko <knst.kolinko@gmail.com> wrote:

>2012/9/20 Mark Thomas <markt@apache.org>:

>> A simple JMeter test requesting the same static file over and over
>again
>> 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
>"Yes!"
>>
>> 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
>content.
>>
>> 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.

Exactly.

>There is a related issue in WebappClassLoader that I filed here:
>https://issues.apache.org/bugzilla/show_bug.cgi?id=52448

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.

Excellent.

Mark


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


Mime
View raw message