Return-Path: X-Original-To: apmail-cxf-issues-archive@www.apache.org Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4627E18C1A for ; Thu, 7 Jan 2016 21:59:40 +0000 (UTC) Received: (qmail 614 invoked by uid 500); 7 Jan 2016 21:59:40 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 579 invoked by uid 500); 7 Jan 2016 21:59:40 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 552 invoked by uid 99); 7 Jan 2016 21:59:39 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Jan 2016 21:59:39 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id D28D42C14F4 for ; Thu, 7 Jan 2016 21:59:39 +0000 (UTC) Date: Thu, 7 Jan 2016 21:59:39 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CXF-6738) Reduce contention on org.apache.cxf.binding.soap.SoapTransportFactory$SoapEndpointInfo MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CXF-6738?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15088199#comment-15088199 ] ASF GitHub Bot commented on CXF-6738: ------------------------------------- GitHub user asoldano opened a pull request: https://github.com/apache/cxf/pull/105 [CXF-6738] Replace synchronized blocks with DCL to reduce contention Sending this as PR for getting explicit review. Please note I had to add a //NOPMD comment to please the PMD checks (which keep on saying that DCL is broken on Java, which is not exactly the case nowadays...) You can merge this pull request into a Git repository by running: $ git pull https://github.com/asoldano/cxf CXF-6738 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cxf/pull/105.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #105 ---- commit a4d92d3bb389f39fa3de8ca9c110d1360324c1d0 Author: Alessio Soldano Date: 2016-01-07T21:51:53Z [CXF-6738] Replace synchronized blocks with DCL to reduce contention ---- > Reduce contention on org.apache.cxf.binding.soap.SoapTransportFactory$SoapEndpointInfo > -------------------------------------------------------------------------------------- > > Key: CXF-6738 > URL: https://issues.apache.org/jira/browse/CXF-6738 > Project: CXF > Issue Type: Improvement > Components: JAX-WS Runtime > Reporter: Alessio Soldano > > By profiling some benchmark application, org.apache.cxf.binding.soap.SoapTransportFactory$SoapEndpointInfo has been found in the contention hotspots. That's because of the multiple synchronized blocks in org.apache.cxf.ws.policy.PolicyEngineImpl, which seem to be there basically for lazily getting the effective policy once the endpoint is fully initialized. > I propose to replace those synchronized blocks with (properly implemented) double-checked locking idiom so that no locking actually happens after endpoints have been initialized. -- This message was sent by Atlassian JIRA (v6.3.4#6332)