Commit 3cc726f
committed
Make ShardAwarePortGenerator to iterate less
Implementation is not optimal, it iterates over ports and filters ones
that don't match `port % total_shards == shard_id`
Let's make it better by calculate right start and iterating only over correct
ports.1 parent facc90a commit 3cc726f
1 file changed
+13
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
673 | 673 | | |
674 | 674 | | |
675 | 675 | | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
676 | 683 | | |
677 | | - | |
678 | | - | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
679 | 689 | | |
680 | | - | |
681 | | - | |
| 690 | + | |
682 | 691 | | |
683 | 692 | | |
684 | 693 | | |
| |||
0 commit comments