gitlab-org--gitlab-foss/spec
Stan Hu 8690ca5c28 Eliminate N+1 queries in loading discussions.json endpoint
In #37955,we see that the profile had a number of N+1 queries from repeated
access to `cross_reference_not_visible_for?`. This was optimized in previous
versions of GitLab by rendering all notes at once, counting the number of
visible references, and then using that number to check whether a system note
should be fully redacted.

There was also another N+1 query calling `ProjectTeam#member?`, which did not
take advantage of an optimization in prepare_notes_for_rendering that would
preload the maximum access level per project.

Closes #37955
2017-09-18 06:53:33 -07:00
..
bin
config
controllers Eliminate N+1 queries in loading discussions.json endpoint 2017-09-18 06:53:33 -07:00
db/production
factories Merge remote-tracking branch 'origin/master' into zj/gitlab-ce-zj-auto-devops-table 2017-09-07 18:03:20 +02:00
features Merge branch 'revert-sidebar-title-attribute' into 'master' 2017-09-15 10:10:25 +00:00
finders Removes default scope from sortable 2017-09-07 13:01:59 +01:00
fixtures Revert "Merge branch 'revert-f2421b2b' into 'master'" 2017-09-11 15:44:42 +00:00
helpers Merge branch '37576-renamed-files-have-escaped-html-for-the-inline-diff-in-the-header' into 'master' 2017-09-14 08:28:04 +00:00
initializers Fix doorkeeper failure 2017-09-13 09:06:18 +00:00
javascripts Return only group's members in user dropdowns on issuables list pages 2017-09-14 18:04:21 +02:00
lib Fix setting share_with_group_lock 2017-09-15 17:38:46 +02:00
mailers Remove some empty lines from notify specs 2017-09-01 13:53:24 +02:00
migrations Revert "Merge branch 'revert-f2421b2b' into 'master'" 2017-09-11 15:44:42 +00:00
models created services for keys 2017-09-15 15:35:24 +00:00
policies Make Members with Owner and Master roles always able to create subgroups 2017-09-07 13:47:58 -05:00
presenters Move trigger_variables to presenter 2017-09-04 22:21:47 +09:00
requests Use the new query-recorder features as a PoC 2017-09-14 17:46:28 +02:00
routing
rubocop/cop
serializers Merge branch '29943-environment-folder' into 'security-9-5' 2017-09-07 20:22:16 -04:00
services Merge branch 'master' into 'issue_37640' 2017-09-15 20:14:53 +00:00
sidekiq/cron
support Merge branch '20824-scope-users-to-members-in-group-issuable-list' into 'master' 2017-09-15 09:20:33 +00:00
tasks
unicorn
uploaders
validators
views CE backport of new-sidebar-boards 2017-09-13 11:08:48 +01:00
workers Restore has_visible_content? to improve performance (cache) 2017-09-14 13:03:36 +02:00
factories_spec.rb
rails_helper.rb
rake_helper.rb
simplecov_env.rb
spec_helper.rb Force RAILS_ENV to test in spec/spec_helper.rb 2017-09-14 17:22:49 +02:00