There is a huge performance hit in late game when large groups of units are regrouping. Turn off regrouping when: 1) threat is far away 2) number of units in group is over some threshold, e.g. 20