Return-Path: X-Original-To: apmail-activemq-users-archive@www.apache.org Delivered-To: apmail-activemq-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 A80E41720E for ; Fri, 8 May 2015 17:34:37 +0000 (UTC) Received: (qmail 82452 invoked by uid 500); 8 May 2015 17:34:37 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 82410 invoked by uid 500); 8 May 2015 17:34:37 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 82390 invoked by uid 99); 8 May 2015 17:34:37 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 May 2015 17:34:37 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 9841B1827D4 for ; Fri, 8 May 2015 17:34:36 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.503 X-Spam-Level: *** X-Spam-Status: No, score=3.503 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_IMAGE_ONLY_32=0.001, HTML_MESSAGE=3, KAM_LOTSOFHASH=0.25, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id AZvnc_Xs7KoP for ; Fri, 8 May 2015 17:34:25 +0000 (UTC) Received: from mail-ob0-f176.google.com (mail-ob0-f176.google.com [209.85.214.176]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id DED7842989 for ; Fri, 8 May 2015 17:34:24 +0000 (UTC) Received: by obfe9 with SMTP id e9so60446105obf.1 for ; Fri, 08 May 2015 10:33:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=xsC6qW5fgnjsLldBWDcT5XKTMxMZ0/VZXvwRk2yOakw=; b=DvGg+fyGckq2+CXubRPxeZzgUQwZnf7c4vw6ERlAa1BoDfyCxxkU9E+MxlVjEvwLTk L9IElVqtDBsov3lQrJXf8J/lmp810qVEvy9zipb7EdhjMqLjyTGpEJHdfuhLA6Cnxp0i aibS28uMbB4T2MqAJoH/we6V0th4Qq6YImA2TTWE59WpsfrBR4Ge2omSAo5aE011ggfu Kc+DAerIvvjaaYlXqDhCxI8VoyopPC9xBxEY4SQQAIz9hOtticyzuiMyREi17LkkqCJ7 PjhR4qGVpyhYJTDaPWttF++Bg+0gOnqlzKEybzLdDm/yCCvkpLkHaXQ1vRgpr/4KpTmv t+IQ== X-Received: by 10.202.216.87 with SMTP id p84mr3755000oig.133.1431106419314; Fri, 08 May 2015 10:33:39 -0700 (PDT) MIME-Version: 1.0 Sender: burtonator2011@gmail.com Received: by 10.183.6.233 with HTTP; Fri, 8 May 2015 10:33:18 -0700 (PDT) In-Reply-To: References: From: Kevin Burton Date: Fri, 8 May 2015 10:33:18 -0700 X-Google-Sender-Auth: j3s3NjVoMERPvKtCbv5K6Qh8exU Message-ID: Subject: =?UTF-8?Q?Re=3A_=E2=80=9CUsage=22_and_other_performance_improvements_by_?= =?UTF-8?Q?avoiding_CopyOnWriteArrayList=2E?= To: users@activemq.apache.org Content-Type: multipart/alternative; boundary=001a113d606ac254780515956db1 --001a113d606ac254780515956db1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sounds good. I have one more small change to logging and I=E2=80=99ll submi= t a PR. On Thu, May 7, 2015 at 5:38 AM, Gary Tully wrote: > those changes look ok to me, as in they won't break anything and you > have numbers that can make your case. Please splash in a patch or PR. > > On 2 May 2015 at 23:08, Kevin Burton wrote: > > I=E2=80=99ve found 3 places where CopyOnWriteArrayList was being used a= nd causing > > significant performance impact O(N^2) when using large numbers of queue= s. > > > > Could I get feedback on these 3 changes? > > > > > https://github.com/spinn3r/activemq/commit/06ebfbf2a4d9201b57069644bdb7eb= 8274da0714 > > > > > https://github.com/spinn3r/activemq/commit/13f606d597b826f5a998866e0fe63e= 63aa278a24 > > > > In both of these situations, I think a Set is a better idea than a List= . > > First, it=E2=80=99s faster. Second, why would we want to cousin someth= ing twice? > > That=E2=80=99s the only reason I would think a List would be used inste= ad of a > Set. > > > > > > > > -- > > > > Founder/CEO Spinn3r.com > > Location: *San Francisco, CA* > > blog: http://burtonator.wordpress.com > > =E2=80=A6 or check out my Google+ profile > > > --=20 Founder/CEO Spinn3r.com Location: *San Francisco, CA* blog: http://burtonator.wordpress.com =E2=80=A6 or check out my Google+ profile --001a113d606ac254780515956db1--