Return-Path: X-Original-To: apmail-hc-httpclient-users-archive@www.apache.org Delivered-To: apmail-hc-httpclient-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7CB09185DF for ; Sun, 20 Dec 2015 21:44:30 +0000 (UTC) Received: (qmail 67904 invoked by uid 500); 20 Dec 2015 21:44:28 -0000 Delivered-To: apmail-hc-httpclient-users-archive@hc.apache.org Received: (qmail 67850 invoked by uid 500); 20 Dec 2015 21:44:28 -0000 Mailing-List: contact httpclient-users-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-users@hc.apache.org Received: (qmail 67270 invoked by uid 99); 20 Dec 2015 21:44:27 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 20 Dec 2015 21:44:27 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 04C531A003D for ; Sun, 20 Dec 2015 21:44:27 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.879 X-Spam-Level: ** X-Spam-Status: No, score=2.879 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id pabND0koybbv for ; Sun, 20 Dec 2015 21:44:26 +0000 (UTC) Received: from mail-ig0-f170.google.com (mail-ig0-f170.google.com [209.85.213.170]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id BBF112050D for ; Sun, 20 Dec 2015 21:44:25 +0000 (UTC) Received: by mail-ig0-f170.google.com with SMTP id ph11so25597343igc.1 for ; Sun, 20 Dec 2015 13:44:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=r1O8suhe8wO0x+IIzsnOvEq54G3ayTOppb9M6UQ1qxQ=; b=aW04MkM9f6vh/BIJsRrv0BShTk1yI8MX3OdcPmhMwc3XgHzOV6QrAfCfT6cJe75076 cdGiwPU5t/eXg++1eBeW8db8jwG/IPmVAWDNfXgTN5mGyiaHtj7Kpb9OeMmAVgf+cXLi /VGsFC9jlym2b3/Xn7paant3rhsxq+Gm2nE4cbacL8DbVr9hHjSYyb5T6JRZQPRtOwXQ nBXRtnhmQDBSD7f2abODJNSilkYH9jiJl8LfvVWhRkEhTpcpyPJisYRs79dFD7bhBR/2 PykDP/pQOgbUfD8CBpsgCVYWrIU7GIGW42eaW1oeRMCswaORsNmf8kNLEqg17npKqFJ3 GiqQ== MIME-Version: 1.0 X-Received: by 10.50.6.42 with SMTP id x10mr15335520igx.14.1450647865197; Sun, 20 Dec 2015 13:44:25 -0800 (PST) Received: by 10.107.51.5 with HTTP; Sun, 20 Dec 2015 13:44:25 -0800 (PST) In-Reply-To: <1400143180.23146.7.camel@ubuntu> References: <1400066881.11226.2.camel@ubuntu> <1400143180.23146.7.camel@ubuntu> Date: Sun, 20 Dec 2015 22:44:25 +0100 Message-ID: Subject: Re: httpClient.getConnectionManager() performance with HTTP only From: Philippe Mouawad To: "dev@jmeter.apache.org" Cc: HttpClient User Discussion Content-Type: multipart/alternative; boundary=047d7bdca2e8b30a4505275b4662 --047d7bdca2e8b30a4505275b4662 Content-Type: text/plain; charset=UTF-8 Hi Oleg, Back to this old subject and knowing that we must stick to 1 HttpClient per thread (as per all the discussion that followed this). Is there a plan to implement this lazy init of SSLContext in HttpClient as it used to be the case in HC3 ? For our project, it's a killer in terms of performance, and for other use cases, it appears kind of weird that an SSLContext is initialized even for a pure HTTP traffic. Thanks Regards On Thu, May 15, 2014 at 10:39 AM, Oleg Kalnichevski wrote: > On Wed, 2014-05-14 at 19:46 +0100, sebb wrote: > > On 14 May 2014 12:28, Oleg Kalnichevski wrote: > > ... > > > >> Issue is not present in HTTPCLient 3.1 > > > > > > Philippe > > > > > > If HttpClient is used correctly, this code should only be executed only > > > once. Why does JMeter create more than one instance of HttpClient? > > > > We currently create an instance for each instance of different proxy > > settings and each protocol and each authority, because the client is > > created with these settings. > > > > This is also done for each thread. > > > > IIRC, this was necessary originally. We have not rewritten the code > > yet to use all the latest features. > > > > I see. For the time what you can do is to use a custom SSL socket > factory that lazily initializes SSL context when requested for the first > time. This is exactly what HC 3.1 does. It will be somewhat slower given > that one would need to mutex to synchronize access to the initialization > code. > > Oleg > > > > Oleg > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org > > For additional commands, e-mail: httpclient-users-help@hc.apache.org > > > > > -- Cordialement. Philippe Mouawad. --047d7bdca2e8b30a4505275b4662--