Merge "Revert "Optimize wedge partition selection."" into nextgenv2