optimize _recalculateHistory