-
- Downloads
Minimize the number of queries by preloading counts and ancestors
By preloading the count of members, projects and subgroups of a group, we don't need to query them later. We also preload the entire hierarchy for a search result and include the counts so we don't need to query for them again
Showing
- app/finders/group_descendants_finder.rb 50 additions, 13 deletionsapp/finders/group_descendants_finder.rb
- app/models/concerns/group_descendant.rb 12 additions, 9 deletionsapp/models/concerns/group_descendant.rb
- app/models/project.rb 4 additions, 0 deletionsapp/models/project.rb
- app/serializers/group_child_entity.rb 17 additions, 4 deletionsapp/serializers/group_child_entity.rb
- spec/controllers/groups_controller_spec.rb 11 additions, 23 deletionsspec/controllers/groups_controller_spec.rb
- spec/finders/group_descendants_finder_spec.rb 16 additions, 22 deletionsspec/finders/group_descendants_finder_spec.rb
Please register or sign in to comment