You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
optimize group based partitioner to not try to merge partitions we already determined were not supposed to be merged (#12798)
### Summary
In the group based partitioner we had a case where we would try to merge
partitions we already determined couldn't be merged, which was causing a
lot more checks to be done. This pr creates a set that tracks the
partitions that we determined cant be merged and ensures that when
considering 2 new partitions either id isnt in this set. Find below the
number of checks on whether each partition can be merged before and
after respectively which has a runtime of O(n^2) where n represents the
number of nodes in a partition.
<img width="84" height="772" alt="image"
src="https://github.com/user-attachments/assets/e1f7b47f-9006-494f-afe1-4da0726362f0"
/>
<img width="68" height="766" alt="image"
src="https://github.com/user-attachments/assets/45d4dbe0-f292-4f80-8e66-53aa68ef3cdb"
/>
### Test plan
I added cnt print logs to check to see the number of times we entered
the check both before and after the change.
0 commit comments