significantly reduce the amount of object creation in PartitionGraphStrategy.