Skip to content
Snippets Groups Projects

Improve performance of the global search for issuables

All threads resolved!
5 files
+ 52
70
Compare changes
  • Side-by-side
  • Inline
Files
5
@@ -30,7 +30,6 @@
# updated_before: datetime
# attempt_group_search_optimizations: boolean
# attempt_project_search_optimizations: boolean
# attempt_global_search_optimizations: boolean
#
class IssuableFinder
prepend FinderWithCrossProjectAccess
@@ -331,8 +330,7 @@ def use_cte_for_search?
next false if params[:sort].present? && !params[:sort].in?(klass.simple_sorts.keys)
attempt_group_search_optimizations? ||
attempt_project_search_optimizations? ||
attempt_global_search_optimizations?
attempt_project_search_optimizations?
end
end
@@ -356,11 +354,6 @@ def attempt_project_search_optimizations?
Feature.enabled?(:attempt_project_search_optimizations)
end
def attempt_global_search_optimizations?
params[:attempt_global_search_optimizations] &&
Feature.enabled?(:attempt_global_search_optimizations)
end
def count_key(value)
Array(value).last.to_sym
end
Loading