Please review rt46405. This should be backported to the maintenance branches after the performance enhancements (45637) have been.