diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2016-01-26 11:54:57 +0100 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2016-01-27 10:33:33 +0100 |
commit | de7c9c7ab17a8b36ca0c645ba1a7a6971a077fb1 (patch) | |
tree | 96254ba55bfe11bbd5ef8221afb1a37369e9737b /app/models/project.rb | |
parent | 128a6411d2a60c855e3c99303d0157f436e32f13 (diff) | |
download | gitlab-ce-events-performance.tar.gz |
Use Atom update times of the first eventevents-performance
By simply loading the first event from the already sorted set we save
ourselves extra (slow) queries just to get the latest update timestamp.
This removes the need for Event.latest_update_time and significantly
reduces the time needed to build an Atom feed.
Fixes gitlab-org/gitlab-ce#12415
Diffstat (limited to 'app/models/project.rb')
-rw-r--r-- | app/models/project.rb | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index 63ecf5b7105..4bd51449c25 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -215,8 +215,6 @@ class Project < ActiveRecord::Base scope :public_and_internal_only, -> { where(visibility_level: Project.public_and_internal_levels) } scope :non_archived, -> { where(archived: false) } - scope :id_only, -> { select(:id) } - state_machine :import_status, initial: :none do event :import_start do transition [:none, :finished] => :started |