Return-Path: X-Original-To: apmail-ignite-commits-archive@minotaur.apache.org Delivered-To: apmail-ignite-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A6C3C18214 for ; Mon, 1 Feb 2016 14:27:20 +0000 (UTC) Received: (qmail 35293 invoked by uid 500); 1 Feb 2016 14:26:58 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 35099 invoked by uid 500); 1 Feb 2016 14:26:58 -0000 Mailing-List: contact commits-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list commits@ignite.apache.org Received: (qmail 33962 invoked by uid 99); 1 Feb 2016 14:26:57 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Feb 2016 14:26:57 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 0DACBE0942; Mon, 1 Feb 2016 14:26:57 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ntikhonov@apache.org To: commits@ignite.apache.org Date: Mon, 01 Feb 2016 14:27:37 -0000 Message-Id: <15c29dcd02e849d19be24fb683203460@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [42/48] ignite git commit: IGNITE-2408 : Removed hotspot from GridDhtAtomicCache$DeferredResponseBuffer.addResponse() caused by a call to size() method which is O(N). Now sizex() method is used instead, which is O(1). This closes #428. IGNITE-2408 : Removed hotspot from GridDhtAtomicCache$DeferredResponseBuffer.addResponse() caused by a call to size() method which is O(N). Now sizex() method is used instead, which is O(1). This closes #428. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/5500a18b Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/5500a18b Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/5500a18b Branch: refs/heads/ignite-2454 Commit: 5500a18b4db1326b2089e51f5b5b9870c7113ecf Parents: 4e61602 Author: Ilya Lantukh Authored: Mon Feb 1 10:42:10 2016 +0300 Committer: vozerov-gridgain Committed: Mon Feb 1 10:42:10 2016 +0300 ---------------------------------------------------------------------- .../cache/distributed/dht/atomic/GridDhtAtomicCache.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/5500a18b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java index 6b23550..cba4e61 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java @@ -3084,7 +3084,7 @@ public class GridDhtAtomicCache extends GridDhtCacheAdapter { private AtomicBoolean guard = new AtomicBoolean(false); /** Response versions. */ - private Collection respVers = new ConcurrentLinkedDeque8<>(); + private ConcurrentLinkedDeque8 respVers = new ConcurrentLinkedDeque8<>(); /** Node ID. */ private final UUID nodeId; @@ -3151,7 +3151,7 @@ public class GridDhtAtomicCache extends GridDhtCacheAdapter { respVers.add(ver); - if (respVers.size() > DEFERRED_UPDATE_RESPONSE_BUFFER_SIZE && guard.compareAndSet(false, true)) + if (respVers.sizex() > DEFERRED_UPDATE_RESPONSE_BUFFER_SIZE && guard.compareAndSet(false, true)) snd = true; } finally {