gitlab-org--gitlab-foss/app/models
Yorick Peterse c52a36e859
Fix N+1 query when displaying events
When displaying events we would load the target of those events, then
render the entire data using our Markdown pipeline. This pipeline would
eventually request the author of every target, leading to an additional
query being executed for every target to get the author.

To fix this we now eager load the author of the event's target. In my
local environment this reduces the number of queries to display a
project's Atom feed from 40 to 24 queries.

See https://gitlab.com/gitlab-org/gitlab-ce/issues/36878 for more
information.
2017-12-08 12:33:51 +01:00
..
blob_viewer move `lib/ci/gitlab_ci_yaml_processor.rb` into `lib/gitlab/ci/yaml_processor.rb` 2017-09-12 22:32:02 +03:00
ci Change feature flag to ci_disable_validates_dependencies to enable it as default 2017-12-07 23:17:46 +09:00
clusters Merge branch '35616-move-k8-to-cluster-page' into cluster-page-with-list-clusters 2017-12-05 13:29:41 +01:00
concerns Allow commenting on individual commits inside an MR 2017-12-07 09:01:19 -05:00
conversational_development_index Store & use ConvDev percentages returned by Version app 2017-08-07 20:52:08 +02:00
cycle_analytics
diff_viewer Implement diff viewers 2017-06-14 10:12:21 -05:00
hooks Wrong data type when testing webhooks 2017-07-20 15:12:06 +00:00
issue
members a membership with no user is always notifiable 2017-08-11 16:02:04 -07:00
merge_request
network Detect n+1 issues involving Gitaly 2017-09-19 10:55:37 +00:00
project_services Check diff between KubernetesService and Platforms::Kubernetes. Synchronize again. 2017-11-28 20:47:59 +09:00
protected_branch Enabled no-one as a merge access level in protected branches 2017-05-10 17:19:40 +01:00
protected_tag Deduplicate protected ref human_access_levels 2017-11-24 13:47:03 +00:00
storage Refactor Hashed Storage migration to add additional migration steps 2017-11-23 14:19:36 +01:00
.gitkeep
ability.rb bugfix: use `require_dependency` to bring in DeclarativePolicy 2017-06-29 11:57:59 -07:00
abuse_report.rb Refactor the DeleteUserWorker 2017-06-05 13:08:06 +01:00
appearance.rb Add custom brand text on new project pages 2017-12-04 17:22:59 +01:00
application_setting.rb Move the circuitbreaker check out in a separate process 2017-12-08 09:11:39 +01:00
audit_event.rb Rename ActiverecordSerialize cop 2017-07-06 12:01:36 +02:00
award_emoji.rb Use `try` instead of `repond_to?` and a method call 2017-08-18 12:48:04 +02:00
blob.rb Batchload blobs for diff generation 2017-11-21 13:53:26 +01:00
board.rb Small fixes 2017-08-31 16:34:57 -03:00
broadcast_message.rb Removes default scope from sortable 2017-09-07 13:01:59 +01:00
chat_name.rb
chat_team.rb Remove Mattermost team with GitLab group 2017-07-28 09:09:55 +02:00
commit.rb add support for the commit reference filter 2017-12-07 09:01:37 -05:00
commit_collection.rb Optimise getting the pipeline status of commits 2017-11-16 16:01:14 +01:00
commit_range.rb Fix link text from group context 2017-11-23 12:59:14 +01:00
commit_status.rb Fail jobs if its dependency is missing 2017-12-06 15:53:59 +09:00
compare.rb
container_repository.rb
cycle_analytics.rb
dashboard_milestone.rb replace `is_dashboard_milestone?` with `dashboard_milestone?` 2017-08-29 11:14:41 +03:00
deploy_key.rb created services for keys 2017-09-15 15:35:24 +00:00
deploy_keys_project.rb Enable Layout/TrailingWhitespace cop and auto-correct offenses 2017-08-15 13:44:37 -04:00
deployment.rb replace `is_ancestor?` with `ancestor?` 2017-08-29 11:14:41 +03:00
diff_discussion.rb Allow commenting on individual commits inside an MR 2017-12-07 09:01:19 -05:00
diff_note.rb Allow commenting on individual commits inside an MR 2017-12-07 09:01:19 -05:00
directly_addressed_user.rb
discussion.rb Allow commenting on individual commits inside an MR 2017-12-07 09:01:19 -05:00
discussion_note.rb
email.rb Use fuzzy search with minimum length of 3 characters where appropriate 2017-11-27 11:29:40 +01:00
environment.rb Replce kubernetes_service and deployment_service to deployment_platform 2017-11-28 20:47:59 +09:00
epic.rb Refactor banzai to support referencing from group context 2017-12-06 19:16:22 +01:00
event.rb Fix N+1 query when displaying events 2017-12-08 12:33:51 +01:00
event_collection.rb Use a specialized class for querying events 2017-08-10 17:45:49 +02:00
external_issue.rb Fix link text from group context 2017-11-23 12:59:14 +01:00
fork_network.rb Unlink a project from a fork network when it's source was deleted. 2017-11-03 12:17:59 +01:00
fork_network_member.rb Delete the fork network when removing the last membership 2017-11-17 12:58:15 +01:00
forked_project_link.rb Don't resolve fork relationships for projects pending delete 2017-07-04 12:02:29 +01:00
generic_commit_status.rb Allow to access pipelines even if they are disabled, but only present jobs and commit statuses without giving ability to access them 2017-06-13 09:52:48 +02:00
global_label.rb Fix dashboard labels dropdown 2017-07-07 14:35:16 +01:00
global_milestone.rb Move total time spend calculation to milestoneish 2017-11-11 16:47:39 +02:00
gpg_key.rb Invalidate GpgSignatures associated to GpgKeySubkeys when revoking the GpgKey 2017-10-05 08:26:02 -05:00
gpg_key_subkey.rb Remove no longer required methods 2017-10-05 08:26:02 -05:00
gpg_signature.rb Fix error with GPG signature updater when commit was deleted 2017-10-07 10:47:53 -05:00
group.rb Support uploads for groups 2017-12-07 12:27:52 +01:00
group_custom_attribute.rb Support custom attributes on groups 2017-11-06 10:51:50 +01:00
group_label.rb
group_milestone.rb replace `is_legacy_group_milestone?` with `legacy_group_milestone?` 2017-08-29 11:14:41 +03:00
guest.rb
identity.rb Changing OAuth lookup to be case insensitive 2017-11-17 14:24:25 +00:00
individual_note_discussion.rb
instance_configuration.rb Added ssh fingerprint, gitlab ci and pages information in an instance configuration page 2017-10-25 23:51:26 +03:00
issue.rb Throttle the number of UPDATEs triggered by touch 2017-12-06 15:59:37 +01:00
issue_assignee.rb Move update_assignee_cache_counts to the service 2017-05-12 14:12:29 +03:00
issue_collection.rb Enable Style/DotPosition Rubocop 👮 2017-06-21 13:48:12 +00:00
key.rb Consistently schedule Sidekiq jobs 2017-12-05 11:59:39 +01:00
label.rb Fix link text from group context 2017-11-23 12:59:14 +01:00
label_link.rb Added Cop to blacklist polymorphic associations 2017-06-07 17:36:55 +02:00
label_priority.rb
legacy_diff_discussion.rb Commenting on image diffs 2017-10-07 04:25:17 +00:00
legacy_diff_note.rb Rename ActiverecordSerialize cop 2017-07-06 12:01:36 +02:00
lfs_object.rb Handle forks in Gitlab::Checks::LfsIntegrity 2017-11-09 13:44:20 +00:00
lfs_objects_project.rb Don’t schedule workers from inside transactions 2017-06-02 11:43:32 -05:00
list.rb Merge branch 'expand-backlog-closed-lists-issue-boards' into 'master' 2017-06-07 15:05:37 +00:00
member.rb Consistently schedule Sidekiq jobs 2017-12-05 11:59:39 +01:00
merge_request.rb adding view and feature specs 2017-12-07 09:06:59 -05:00
merge_request_diff.rb Remove serialised diff and commit columns 2017-11-28 16:13:40 +00:00
merge_request_diff_commit.rb Handle large values on `MergeRequestDiffCommit` dates 2017-10-30 21:13:39 -03:00
merge_request_diff_file.rb Fix saving diffs that are not valid UTF-8 2017-07-26 15:34:57 +01:00
merge_requests_closing_issues.rb Enable Style/DotPosition Rubocop 👮 2017-06-21 13:48:12 +00:00
milestone.rb [CE-Backport] Fix board filter when milestone is predefined 2017-12-05 15:34:31 -02:00
namespace.rb Cache the forks in a namespace in the RequestStore 2017-12-04 17:43:48 +01:00
note.rb cache the Note#commit method 2017-12-07 09:02:55 -05:00
notification_recipient.rb don't rely on order of notification levels 2017-08-21 15:34:25 -07:00
notification_setting.rb Re-enable SqlInjection and CommandInjection 2017-08-08 10:50:54 -04:00
oauth_access_grant.rb
oauth_access_token.rb Update specs for sudo behavior 2017-11-02 11:39:03 +01:00
out_of_context_discussion.rb
pages_domain.rb Adds Rubocop rule for line break after guard clause 2017-11-16 17:58:29 +01:00
personal_access_token.rb Fix new personal access token showing up in a flash message 2017-12-07 16:22:37 -06:00
personal_snippet.rb
project.rb Remove Rugged::Repository#empty? 2017-12-07 15:33:30 +00:00
project_authorization.rb Enable Style/DotPosition Rubocop 👮 2017-06-21 13:48:12 +00:00
project_auto_devops.rb Add warning message if domain or cluster are not configured 2017-09-19 15:32:31 +02:00
project_custom_attribute.rb Support custom attributes on projects 2017-11-06 10:51:46 +01:00
project_feature.rb Fix project feature being deleted when updating project with invalid visibility level 2017-09-12 18:10:34 -03:00
project_group_link.rb
project_import_data.rb Backport changes in https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/2551 to CE 2017-08-07 19:17:11 +01:00
project_label.rb
project_snippet.rb
project_statistics.rb Revert "Rename `job_archive|metadata` to `artifacts_archive|metadata`" 2017-12-03 12:04:49 +01:00
project_team.rb Resolve "Display member role per project" 2017-12-07 09:11:41 +00:00
project_wiki.rb Resolve "Performance issues when loading large number of wiki pages" 2017-11-17 11:48:32 +00:00
protectable_dropdown.rb Whitelist or fix additional `Gitlab/PublicSend` cop violations 2017-08-14 12:14:11 -04:00
protected_branch.rb Only load branch names for protected branch checks 2017-11-29 16:54:54 +01:00
protected_ref_matcher.rb
protected_tag.rb Only load branch names for protected branch checks 2017-11-29 16:54:54 +01:00
push_event.rb Remove redundant WHERE from event queries 2017-09-20 13:40:25 +02:00
push_event_payload.rb Migrate events into a new format 2017-08-10 17:45:44 +02:00
readme_blob.rb Load tree readme asynchronously 2017-05-10 08:21:58 -05:00
redirect_route.rb Enable Layout/TrailingWhitespace cop and auto-correct offenses 2017-08-15 13:44:37 -04:00
release.rb
repository.rb Remove Rugged::Repository#empty? 2017-12-07 15:33:30 +00:00
route.rb Added Cop to blacklist polymorphic associations 2017-06-07 17:36:55 +02:00
security_event.rb
sent_notification.rb Don't show an "Unsubscribe" link in snippet comment notifications 2017-10-09 15:03:05 +02:00
service.rb Consistently schedule Sidekiq jobs 2017-12-05 11:59:39 +01:00
snippet.rb Use fuzzy search with minimum length of 3 characters where appropriate 2017-11-27 11:29:40 +01:00
snippet_blob.rb
spam_log.rb Refactor the DeleteUserWorker 2017-06-05 13:08:06 +01:00
subscription.rb Added Cop to blacklist polymorphic associations 2017-06-07 17:36:55 +02:00
system_note_metadata.rb add the missing spec 2017-11-20 13:00:35 -05:00
timelog.rb
todo.rb Enable Style/DotPosition Rubocop 👮 2017-06-21 13:48:12 +00:00
tree.rb Load tree readme asynchronously 2017-05-10 08:21:58 -05:00
trending_project.rb
u2f_registration.rb
upload.rb Added Cop to blacklist polymorphic associations 2017-06-07 17:36:55 +02:00
user.rb Resolve "Display member role per project" 2017-12-07 09:11:41 +00:00
user_agent_detail.rb Added Cop to blacklist polymorphic associations 2017-06-07 17:36:55 +02:00
user_custom_attribute.rb Support custom attributes on users 2017-09-28 16:49:42 +00:00
user_synced_attributes_metadata.rb Profile updates from providers 2017-09-06 16:38:52 +03:00
users_star_project.rb
wiki_directory.rb
wiki_page.rb Resolve "Performance issues when loading large number of wiki pages" 2017-11-17 11:48:32 +00:00