Return-Path: X-Original-To: apmail-hc-dev-archive@www.apache.org Delivered-To: apmail-hc-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A402396C8 for ; Fri, 4 Nov 2011 19:14:16 +0000 (UTC) Received: (qmail 57083 invoked by uid 500); 4 Nov 2011 19:14:16 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 57019 invoked by uid 500); 4 Nov 2011 19:14:16 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 56874 invoked by uid 99); 4 Nov 2011 19:14:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Nov 2011 19:14:16 +0000 X-ASF-Spam-Status: No, hits=-2001.2 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Nov 2011 19:14:13 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 5E31B30C5C2 for ; Fri, 4 Nov 2011 19:13:52 +0000 (UTC) Date: Fri, 4 Nov 2011 19:13:52 +0000 (UTC) From: "Jon Moore (Commented) (JIRA)" To: dev@hc.apache.org Message-ID: <1004102180.699.1320434032387.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <371106350.9107.1318513812088.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HTTPCLIENT-1137) The values for the Via header are created by httpclient-cache for each cached and backend request MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HTTPCLIENT-1137?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13144255#comment-13144255 ] Jon Moore commented on HTTPCLIENT-1137: --------------------------------------- Ok, patch checked in. Thanks much, Alin! > The values for the Via header are created by httpclient-cache for each cached and backend request > ------------------------------------------------------------------------------------------------- > > Key: HTTPCLIENT-1137 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1137 > Project: HttpComponents HttpClient > Issue Type: Improvement > Components: Cache > Affects Versions: 4.1.2 > Reporter: Alin Vasile > Priority: Trivial > Fix For: 4.2 Alpha2 > > Attachments: cached_via_header_vals.patch, via_header_hashmap.patch > > > The Via header that gets generated and inserted by the caching layer is done repeatedly in the HTTP conversation, even if the constructed string is constant for each protocol version that is involved. > The proposed patch constructs a map of generated values held in memory with the associated ProtocolVersion as a key and uses read/write locks to access the data. This solution minimizes the time to generate such a value from several milliseconds to 40-50 microseconds. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org