gitlab-org--gitlab-foss/app/controllers/admin
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
..
clusters Check instance cluster feature at policy level 2019-05-07 08:37:04 +12:00
abuse_reports_controller.rb
appearances_controller.rb Externalize strings in admin controllers 2019-03-21 14:31:34 +01:00
application_controller.rb Check instance cluster feature at policy level 2019-05-07 08:37:04 +12:00
application_settings_controller.rb Add RateLimiter to RawController 2019-07-24 19:49:31 +00:00
applications_controller.rb Externalize strings in admin controllers 2019-03-21 14:31:34 +01:00
background_jobs_controller.rb
broadcast_messages_controller.rb Externalize strings in admin controllers 2019-03-21 14:31:34 +01:00
clusters_controller.rb Check instance cluster feature at policy level 2019-05-07 08:37:04 +12:00
dashboard_controller.rb
deploy_keys_controller.rb Externalize strings in admin controllers 2019-03-21 14:31:34 +01:00
gitaly_servers_controller.rb
groups_controller.rb Preload routes information 2019-09-03 12:16:03 +02:00
health_check_controller.rb
hook_logs_controller.rb
hooks_controller.rb Externalize strings in admin controllers 2019-03-21 14:31:34 +01:00
identities_controller.rb Externalize strings in admin controllers 2019-03-21 14:31:34 +01:00
impersonation_tokens_controller.rb Added write_repository scope for personal access token 2019-04-15 13:05:55 +00:00
impersonations_controller.rb
jobs_controller.rb
keys_controller.rb Externalize strings in admin controllers 2019-03-21 14:31:34 +01:00
labels_controller.rb Externalize strings in admin controllers 2019-03-21 14:31:34 +01:00
logs_controller.rb Add Kubernetes logs to monitoring UI 2019-05-27 09:52:51 -05:00
projects_controller.rb Redirect to admin projects index if project was deleted from admin page 2019-05-29 20:18:40 +00:00
requests_profiles_controller.rb Bring backward compatibility for request profiles 2019-07-23 09:30:00 +00:00
runner_projects_controller.rb
runners_controller.rb Externalize strings in admin controllers 2019-03-21 14:31:34 +01:00
services_controller.rb
spam_logs_controller.rb Externalize strings in admin controllers 2019-03-21 14:31:34 +01:00
system_info_controller.rb
users_controller.rb CE Port: Log impersonation actions in audit log 2019-07-23 11:44:09 +05:30