Repository: giraph
Updated Branches:
  refs/heads/trunk 093e81995 -> bac93fade


GIRAPH-1052: Fix makeSymmetricUnweighted

Summary: PrepareGraphPieces.makeSymmetricUnweighted is currently very 
inefficient for skewed degree graphs, because it reuses set objects based on 
the number of in edges, but also adds all out edges to the set, so sets which 
should be small can become huge. Since incoming ids are unique anyways, we 
don't need to add them to the set.

Test Plan: Ran a job without and with the change, verified result is the same 
but it's much faster now

Reviewers: ikabiljo

Differential Revision: https://reviews.facebook.net/D56481


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

Branch: refs/heads/trunk
Commit: bac93fadea1a696e9017e273be594b4b0981f010
Parents: 093e819
Author: Maja Kabiljo <[email protected]>
Authored: Fri Apr 8 14:33:50 2016 -0700
Committer: Maja Kabiljo <[email protected]>
Committed: Fri Apr 8 14:35:19 2016 -0700

----------------------------------------------------------------------
 .../giraph/block_app/library/prepare_graph/PrepareGraphPieces.java  | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/giraph/blob/bac93fad/giraph-block-app-8/src/main/java/org/apache/giraph/block_app/library/prepare_graph/PrepareGraphPieces.java
----------------------------------------------------------------------
diff --git 
a/giraph-block-app-8/src/main/java/org/apache/giraph/block_app/library/prepare_graph/PrepareGraphPieces.java
 
b/giraph-block-app-8/src/main/java/org/apache/giraph/block_app/library/prepare_graph/PrepareGraphPieces.java
index 41c315a..e9215f0 100644
--- 
a/giraph-block-app-8/src/main/java/org/apache/giraph/block_app/library/prepare_graph/PrepareGraphPieces.java
+++ 
b/giraph-block-app-8/src/main/java/org/apache/giraph/block_app/library/prepare_graph/PrepareGraphPieces.java
@@ -178,7 +178,6 @@ public class PrepareGraphPieces {
           Edge<I, NullWritable> edge =
               EdgeFactory.create(idTypeOps.createCopy(neighbor));
           vertex.addEdge(edge);
-          set.add(neighbor);
         }
       }
     };

Reply via email to