Don't include soft deleted groups in search filter
Fixes CNVS-16369 Test Plan: 1) Create a large dataset locally. One way from a rails console: ``` c = Course.last (1..6).each do |n| gc = GroupCategory.create!(context: c, name: "Name#{n}") (1..200).each do |m| Group.create!(name: "Name#{m}", group_category: gc, context: c) end end GroupCategory.last(4).map(&:destroy) ``` 2) On Master, see that the load time for the course users page (everyone tab) is long. 14 seconds in my case. 3) On this branch, see that the load time is much much shorter, 6 seconds in my case. Change-Id: Ic68ef085e56a69b972cdb8069bc15cda4bd2c112 Reviewed-on: https://gerrit.instructure.com/43163 Reviewed-by: Joel Hough <joel@instructure.com> Tested-by: Jenkins <jenkins@instructure.com> QA-Review: Steven Shepherd <sshepherd@instructure.com> Product-Review: Matthew Wheeler <mwheeler@instructure.com>
This commit is contained in:
parent
c23f0fe632
commit
d0a342f654
|
@ -88,7 +88,7 @@ module SearchHelper
|
|||
visibility = context.enrollment_visibility_level_for(@current_user, context.section_visibilities_for(@current_user), true)
|
||||
sections = visibility == :sections ? context.sections_visible_to(@current_user) : context.course_sections
|
||||
add_sections.call sections
|
||||
add_groups.call context.groups
|
||||
add_groups.call context.groups.active
|
||||
elsif context.is_a?(CourseSection)
|
||||
add_courses.call [context.course], :current
|
||||
add_sections.call context.course.sections_visible_to(@current_user, [context])
|
||||
|
|
Loading…
Reference in New Issue