ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sevdoki...@apache.org
Subject [1/5] incubator-ignite git commit: # ignite-47 Optimization: avoid array resize.
Date Sat, 07 Mar 2015 19:16:49 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-47 6d2f81a8e -> d41ceef50


# ignite-47 Optimization: avoid array resize.


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

Branch: refs/heads/ignite-47
Commit: 67a1711c73ea2a3dc1a61c6d935bdfe6f4e65a07
Parents: 6d2f81a
Author: sevdokimov <sergey.evdokimov@jetbrains.com>
Authored: Sat Mar 7 16:48:25 2015 +0300
Committer: sevdokimov <sergey.evdokimov@jetbrains.com>
Committed: Sat Mar 7 16:48:25 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/67a1711c/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 2957801..57f8838 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