Add edges in batches