Return-Path: X-Original-To: apmail-camel-issues-archive@minotaur.apache.org Delivered-To: apmail-camel-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0E260E8BA for ; Tue, 25 Jun 2013 01:18:21 +0000 (UTC) Received: (qmail 17149 invoked by uid 500); 25 Jun 2013 01:18:21 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 16806 invoked by uid 500); 25 Jun 2013 01:18:20 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 16795 invoked by uid 99); 25 Jun 2013 01:18:20 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Jun 2013 01:18:20 +0000 Date: Tue, 25 Jun 2013 01:18:20 +0000 (UTC) From: "Willem Jiang (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (CAMEL-6485) Performance improvement in DefaultCamelContext by delaying synchronized block 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/CAMEL-6485?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Willem Jiang reassigned CAMEL-6485: ----------------------------------- Assignee: Willem Jiang > Performance improvement in DefaultCamelContext by delaying synchronized block > ----------------------------------------------------------------------------- > > Key: CAMEL-6485 > URL: https://issues.apache.org/jira/browse/CAMEL-6485 > Project: Camel > Issue Type: Improvement > Components: camel-core > Affects Versions: 2.11.0 > Reporter: Eric > Assignee: Willem Jiang > Labels: performance > Attachments: defaultcamelcontext.patch > > > When using Camel in a hi-throughput/multithreaded environment, I see a lot of contention in the DefaultCamelContext.getManagementStrategy() method. Camel is synchronizing on an AtomicBoolean no matter what is the value of the boolean. It is only required if the managementStrategy has not been initialized yet. I have attached a patch that delays the synchronization to when the managementStrategy is not initialized. This dramatically improved the performance of my system. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira