ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [26/48] incubator-ignite git commit: # ignite-47 Optimization: avoid array resize. (cherry picked from commit 67a1711)
Date Thu, 12 Mar 2015 10:16:12 GMT
# ignite-47 Optimization: avoid array resize.
(cherry picked from commit 67a1711)


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/c55c24c0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/c55c24c0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/c55c24c0

Branch: refs/heads/ignite-394
Commit: c55c24c04e80ac96f4c77bc9f989789461126424
Parents: b73239f
Author: sevdokimov <sevdokimov@gridgain.com>
Authored: Sat Mar 7 16:48:25 2015 +0300
Committer: sevdokimov <sevdokimov@gridgain.com>
Committed: Wed Mar 11 18:33:50 2015 +0300

----------------------------------------------------------------------
 .../main/java/org/apache/ignite/internal/GridTaskSessionImpl.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c55c24c0/modules/core/src/main/java/org/apache/ignite/internal/GridTaskSessionImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridTaskSessionImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/GridTaskSessionImpl.java
index 25ebb37..db46fb9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridTaskSessionImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridTaskSessionImpl.java
@@ -485,8 +485,9 @@ public class GridTaskSessionImpl implements GridTaskSessionInternal {
         assert isTaskNode();
 
         synchronized (mux) {
-            Collection<ComputeJobSibling> tmp = new ArrayList<>(this.siblings);
+            Collection<ComputeJobSibling> tmp = new ArrayList<>(this.siblings.size()
+ siblings.size());
 
+            tmp.addAll(this.siblings);
             tmp.addAll(siblings);
 
             this.siblings = Collections.unmodifiableCollection(tmp);


Mime
View raw message