|
[
Permlink
| « Hide
]
Lars Torunski added a comment - 21/Mar/05 04:30 PM
Sources from Fernando Martins were modified and added to the CVS.
The sources from Fernando Martins were moved to
Lars,
thanks for separating the issues. I just reviewed CVS changes, and noticed that you check for gzip support (acceptsGZipEncoding) always, no matter if the responseContent is gziped or not. Shouldn't this be done only in the case when the cached response is in fact gziped (responseContent.isContentGziped())? The reason is not only semantical but also performance related, since isContentGziped only performs a simple String equals, when acceptsGzipEncoding has to get the headers from the request and check for indexOf which I believe is slower. Besides the method is protected and thus can/should be overriden so that more extensive (and performance expensive) checks can be done for browser agents etc. Sorry for insisting about it, but this is code which is executed on each request and when you're dealing with millions of requests per day it can start to make a difference. Also notice the unused import statements in ResponseContent. The rest looks ok. Thanks This check is needed for the full gzip support (CACHE-49): If the content is not gzipped and the browser supports gzip encoding, we will be able to gzip the content in ResponseContent. Should I remove the check in this release?
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||