forked from cybrespace/mastodon
		
	Do not re-query mentions from serializers (#6858)
Fix performance regression from #6836
This commit is contained in:
		
							parent
							
								
									da70aca28e
								
							
						
					
					
						commit
						9fe1619db9
					
				
					 2 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -57,7 +57,7 @@ class ActivityPub::NoteSerializer < ActiveModel::Serializer
 | 
			
		|||
  end
 | 
			
		||||
 | 
			
		||||
  def virtual_tags
 | 
			
		||||
    object.mentions.order(:id) + object.tags + object.emojis
 | 
			
		||||
    object.mentions.to_a.sort_by(&:id) + object.tags + object.emojis
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def atom_uri
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -87,7 +87,7 @@ class REST::StatusSerializer < ActiveModel::Serializer
 | 
			
		|||
  end
 | 
			
		||||
 | 
			
		||||
  def ordered_mentions
 | 
			
		||||
    object.mentions.order(:id)
 | 
			
		||||
    object.mentions.to_a.sort_by(&:id)
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  class ApplicationSerializer < ActiveModel::Serializer
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue