PERF: Reduce number of queries and size of payload when searching.

PERF: Reduce number of queries and size of payload when searching.

  1. Remove cooked becaused only the blurb is used on the client side to display search results.
  2. Remove ignored because the result is not used in anyway when searching for pots.
diff --git a/app/serializers/search_post_serializer.rb b/app/serializers/search_post_serializer.rb
index 8f98beb..7664e85 100644
--- a/app/serializers/search_post_serializer.rb
+++ b/app/serializers/search_post_serializer.rb
@@ -6,4 +6,12 @@ class SearchPostSerializer < BasicPostSerializer
   def blurb
     options[:result].blurb(object)
   end
+
+  def include_cooked?
+    false
+  end
+
+  def include_ignored?
+    false
+  end
 end

GitHub sha: 03c6b22c

2 Likes

This commit has been mentioned on Discourse Meta. There might be relevant details there:

This commit has been mentioned on Discourse Meta. There might be relevant details there: