Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
0.6.4
-
None
-
None
Description
Each GraphJobRunner (BSPTask) calls vertex.compute() method sequentially in a while loop:
while (iterator.hasNext( currentMessage == null ? null : (V) currentMessage.getVertexId(), Strategy.ALL)) { vertex = iterator.next(); if (currentMessage != null) { iterable = iterate(currentMessage, (V) currentMessage.getVertexId(), vertex, peer); } if (iterable != null && vertex.isHalted()) { vertex.setActive(); } if (!vertex.isHalted()) { if (iterable == null) { vertex.compute(Collections.<M> emptyList()); } else { vertex.compute(iterable); currentMessage = iterable.getOverflowMessage(); } activeVertices++; } // note that we even need to rewrite the vertex if it is halted for // consistency reasons vertices.finishVertexComputation(vertex); }
I might be wrong but I'm sure we can improve the performance using the background threads.