gitlab-org--gitlab-foss/app/controllers
Andreas Brandl 53801b1206
Preload routes information
This fixes a high frequency N+1 issue:

`RoutableActions#find_routable!` is used across many controllers to
retrieve e.g. the Project or Namespace by path. The `#find_routable!`
method calls `#ensure_canonical_path` which in turn retrieves
`#full_path` from the given Routable.

This in turn triggers a lookup on `routes`, leading to a high frequency
of these queries:

```sql
SELECT  "routes".* FROM "routes" WHERE "routes"."source_id" = $1 AND
"routes"."source_type" = $2 LIMIT $3
```

This is unnecessary as we already join `routes` in
`Routable#find_by_full_path` anyways.
2019-09-03 12:16:03 +02:00
..
admin Preload routes information 2019-09-03 12:16:03 +02:00
boards Save board lists collapsed setting 2019-08-28 20:18:40 +00:00
ci
clusters Allow switching clusters between managed/unmanaged 2019-06-18 09:09:11 +10:00
concerns Merge branch 'fix-peek-on-puma' into 'master' 2019-09-02 08:43:21 +00:00
dashboard Remove N+1 SQL query loading project feature in dashboard 2019-08-23 14:11:23 -07:00
explore Add SortingPreference concern 2019-08-21 10:13:45 +00:00
google_api Validate session key when authorizing with GCP to create a cluster 2019-02-19 17:21:08 +11:00
groups admin_group authorization for Groups::RunnersController 2019-08-22 11:48:24 -04:00
import Add filter param sanitization 2019-08-12 11:16:52 +01:00
instance_statistics
ldap Externalize several strings in 2019-04-16 10:32:05 +00:00
oauth
profiles Externalize strings of email page in user profile 2019-06-10 08:41:22 +00:00
projects Avoid calling freeze on already frozen strings in app/controllers 2019-09-01 01:57:25 +05:30
sherlock Fix deprecation: redirect_to :back is deprecated 2019-01-02 19:48:07 +01:00
snippets Change block parameter name to params 2019-08-01 10:58:17 +02:00
users
abuse_reports_controller.rb Externalize strings in flash messages 2019-04-08 14:17:45 +00:00
acme_challenges_controller.rb Add pages domains acme orders 2019-06-06 18:55:31 +00:00
application_controller.rb Avoid calling freeze on already frozen strings in app/controllers 2019-09-01 01:57:25 +05:30
autocomplete_controller.rb Renaming AwardedEmojiFinder to a Service 2019-08-21 10:00:00 +12:00
chaos_controller.rb Adds chaos endpoints to Sidekiq 2019-07-18 19:04:12 +02:00
confirmations_controller.rb Don't redirect to the Almost there page 2019-08-08 13:58:20 +02:00
dashboard_controller.rb Consider array params on rendering MR list on dashboard 2019-04-04 14:54:25 +00:00
graphql_controller.rb Propagate argument errors as execution errors 2019-07-30 11:12:24 -04:00
groups_controller.rb Allow disabling group/project email notifications 2019-08-15 17:37:36 +00:00
health_check_controller.rb
health_controller.rb
help_controller.rb Run rubocop -a on CE files 2019-05-05 03:24:28 -07:00
ide_controller.rb Added Usage Data for some Web IDE actions 2019-07-19 11:11:27 +00:00
invites_controller.rb Externalize strings in flash messages 2019-04-08 14:17:45 +00:00
jwt_controller.rb JwtController avoids activating session checks 2019-08-22 16:44:09 +01:00
metrics_controller.rb
notification_settings_controller.rb Refresh group overview to match project overview 2019-01-25 10:26:35 +00:00
omniauth_callbacks_controller.rb Ensure Warden triggers after_authentication callback 2019-07-26 07:05:50 +00:00
passwords_controller.rb Externalize strings in flash messages 2019-04-08 14:17:45 +00:00
profiles_controller.rb i18n: externalize strings from user profile settings 2019-05-09 08:39:08 +00:00
projects_controller.rb CE: Audit event for archiving and unarchiving projects 2019-08-21 09:12:48 +05:30
registrations_controller.rb Merge branch '47003-user-onboarding-replace-current-email-confirmation-flow-with-a-soft-email-confirmation-flow' into 'master' 2019-08-16 12:31:16 +00:00
root_controller.rb Update comments about N + 1 Gitaly calls 2019-04-09 17:21:16 +02:00
search_controller.rb Load search result counts asynchronously 2019-08-12 22:01:15 +02:00
sent_notifications_controller.rb Externalize strings in flash messages 2019-04-08 14:17:45 +00:00
sessions_controller.rb Avoid calling freeze on already frozen strings in app/controllers 2019-09-01 01:57:25 +05:30
snippets_controller.rb Rewrite `if:` argument in before_action and alike when `only:` is also used 2019-07-18 10:04:06 +05:30
uploads_controller.rb Add direct upload support for personal snippets 2019-08-23 11:19:14 +02:00
user_callouts_controller.rb
users_controller.rb Fix display of own projects on the starred projects user profile tab 2019-08-07 20:49:18 +02:00