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 278159770 for ; Tue, 11 Oct 2011 20:22:06 +0000 (UTC) Received: (qmail 77274 invoked by uid 500); 11 Oct 2011 20:22:06 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 77235 invoked by uid 500); 11 Oct 2011 20:22:05 -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 77227 invoked by uid 99); 11 Oct 2011 20:22:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Oct 2011 20:22:05 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of alinachegalati@gmail.com designates 74.125.82.179 as permitted sender) Received: from [74.125.82.179] (HELO mail-wy0-f179.google.com) (74.125.82.179) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Oct 2011 20:21:58 +0000 Received: by wyg36 with SMTP id 36so7266091wyg.10 for ; Tue, 11 Oct 2011 13:21:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=YTKhnmbCGPNCbEEklVRyvU9IddLMEucWNCVS6i8K8MY=; b=widbv1hx6W1fCPJz4y/qf2gMLOlne7ED4J+RbetIj4q1A7CUGmXQymKV5518dTLJdu Y45GMxj+2nGq+NrgHBo1y7akgcmhskJVClW3jUCsWJPlKl3eN2DOpULOm6na2CnR43rg SFWBJcmetzaSLTwjwmjDFSWqcUiauvxf1n2z4= MIME-Version: 1.0 Received: by 10.216.229.84 with SMTP id g62mr8282217weq.23.1318364497489; Tue, 11 Oct 2011 13:21:37 -0700 (PDT) Received: by 10.216.208.33 with HTTP; Tue, 11 Oct 2011 13:21:37 -0700 (PDT) Date: Tue, 11 Oct 2011 23:21:37 +0300 Message-ID: Subject: CachinghttpClient - per request Via headers could be cached From: Vasile Alin To: HttpComponents Project Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Since we handle a small number of protocols (such as HTTP and HTTPS 1.0 and 1.1), we could cache generated Via headers in CachingHttpClient. Each header takes around 3 seconds to create on my machine - Win7 64 bit, AMD Turion X2 & 4Gb of RAM - (would be interesting to find values for other platforms) and would worth improving this area by caching generated Via headers by putting them in a Map with a ProtocolVersion key. Tests show that having this cache in place reduces the time to generate a Via header for each request from 3 seconds to 8 millis. What do you think? Alin --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org