Pregel: Avoid recomputation of vertices