In large courses (500+ students) with a decent amount of gradebook entries, a gradebook regrade caused by adding/moving/modifying a grade item can take a really long time, often several minutes.
To test this, extend the testing instructions from https://tracker.moodle.org/browse/MDL-51498 by adding grades to more assignments and monitoring the regrade time after triggering a gradebook regrade. Even in https://tracker.moodle.org/browse/MDL-51498 a 20+ second query time to regrade an almost empty gradebook with 300 grades is unacceptable.
From what I can tell, regrading is very liberal in choosing which grade items to include, and for each included grade item, a grade_grades entry's alteredaggregationweight and alteredaggregationstatus will be written out to the DB at least twice for each user. Once to reset it, and another time to update it. So a gradebook regrade is linear in the amount of grade_grades items present in the gradebook.