Build edge partitions more efficiently