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
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
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
oauth
profiles
projects Avoid calling freeze on already frozen strings in app/controllers 2019-09-01 01:57:25 +05:30
sherlock
snippets Change block parameter name to params 2019-08-01 10:58:17 +02:00
users
abuse_reports_controller.rb
acme_challenges_controller.rb
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
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
ide_controller.rb Added Usage Data for some Web IDE actions 2019-07-19 11:11:27 +00:00
invites_controller.rb
jwt_controller.rb JwtController avoids activating session checks 2019-08-22 16:44:09 +01:00
metrics_controller.rb
notification_settings_controller.rb
omniauth_callbacks_controller.rb Ensure Warden triggers after_authentication callback 2019-07-26 07:05:50 +00:00
passwords_controller.rb
profiles_controller.rb
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
search_controller.rb Load search result counts asynchronously 2019-08-12 22:01:15 +02:00
sent_notifications_controller.rb
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