- 10 Oct, 2016 1 commit
-
-
Yorick Peterse authored
This commit introduces a Sidekiq worker that precalculates the list of trending projects on a daily basis. The resulting set is stored in a database table that is then queried by Project.trending. This setup means that Unicorn workers no longer _may_ have to calculate the list of trending projects. Furthermore it supports filtering without any complex caching mechanisms. The data in the "trending_projects" table is inserted in the same order as the project ranking. This means that getting the projects in the correct order is simply a matter of: SELECT projects.* FROM projects INNER JOIN trending_projects ON trending_projects.project_id = projects.id ORDER BY trending_projects.id ASC; Such a query will only take a few milliseconds at most (as measured on GitLab.com), opposed to a few seconds for the query used for calculating the project ranks. The migration in this commit does not require downtime and takes care of populating an initial list of trending projects.
-
- 05 Oct, 2016 1 commit
-
-
Yorick Peterse authored
== Public Projects This finder class now _only_ returns public projects. Previously this finder would also return private and internal projects. Including these projects makes caching data much harder and less efficient. Meanwhile including this data isn't very useful as very few users would be interested in seeing projects they have access to as trending. That is, the feature is more useful when you want to see what _other_ popular projects there are. == Caching The data returned by TrendingProjectsFinder is now cached for a day based on the number of months the data should be restricted to. The cache is not flushed explicitly, instead it's rebuilt whenever it expires. == Timings To measure the impact I changed the finder code to use the last 24 months instead of the last month. I then executed and measured 10 requests to the explore page. On the current "master" branch (commit 88fa5916) this would take an average of 2.43 seconds. Using the changes of this commit this was reduced to around 1.7 seconds. Fixes gitlab-org/gitlab-ce#22164
-
- 27 Jul, 2016 1 commit
-
-
Connor Shea authored
In Rails 4.2 and below, skipping callbacks (skip_before_action, skip_after_action, etc.) that use methods which do not exist will not throw any errors. On the other hand, Rails 5 does. See https://github.com/rails/rails/pull/19029 After testing with Rails 5 I noticed there are some methods that don't actually exist (because they were renamed, usually), this fixes a few instances of those. reject_blocked! was introduced in c9def945, I can't find any references to reject_blocked ever existing.
-
- 19 Mar, 2016 1 commit
-
-
Robert Speicher authored
-
- 10 Mar, 2016 2 commits
-
-
Felipe Artur authored
-
Josh Frye authored
-
- 04 Mar, 2016 1 commit
-
-
Dmitriy Zaporozhets authored
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-
- 09 Feb, 2016 3 commits
- 04 Feb, 2016 3 commits
- 04 Jan, 2016 1 commit
-
-
Valery Sizov authored
-
- 08 Sep, 2015 1 commit
-
-
Douwe Maan authored
- Split up SnippetsController into separate dashboard and explore sections. - Use consistent page titles, header titles and sidebars between dashboard and explore sections when signed in or not.
-
- 19 Aug, 2015 1 commit
-
-
Artem Sidorenko authored
Resolves #9285
-
- 01 May, 2015 1 commit
-
-
Douwe Maan authored
-
- 30 Apr, 2015 1 commit
-
-
Douwe Maan authored
-
- 20 Apr, 2015 1 commit
-
-
Jeroen van Baarsen authored
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
-
- 12 Mar, 2015 1 commit
-
-
Dmitriy Zaporozhets authored
-
- 10 Mar, 2015 1 commit
-
-
Dmitriy Zaporozhets authored
-
- 19 Feb, 2015 1 commit
-
-
Dmitriy Zaporozhets authored
-
- 19 Oct, 2014 1 commit
-
-
Ciro Santilli authored
in app controller, user model and services.
-
- 25 Jul, 2014 1 commit
-
-
Dmitriy Zaporozhets authored
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-
- 23 Jul, 2014 1 commit
-
-
Dmitriy Zaporozhets authored
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-