- Nov 19, 2019
-
-
GitLab Bot authored
-
- Nov 08, 2019
-
-
GitLab Bot authored
-
- Oct 18, 2019
-
-
GitLab Bot authored
-
- Oct 17, 2019
-
-
GitLab Bot authored
-
- Apr 01, 2019
-
-
Thong Kuah authored
Adds `# frozen_string_literal: true` to spec/models ruby files
-
- Dec 20, 2018
-
-
Mark Chao authored
-
- Nov 05, 2018
-
-
Yorick Peterse authored
This completely rewrites the SnippetsFinder class from the ground up in order to improve its performance. The old code was beyond salvaging. It was complex, included various Rails 5 workarounds, comments that shouldn't be necessary, and most important of all: it produced a really poorly performing database query. As a result, I opted for rewriting the finder from scratch, instead of trying to patch the existing code. Instead of trying to reuse as many existing methods as possible, I opted for defining new methods specifically meant for the SnippetsFinder. This requires some extra code here and there, but allows us to have much more control over the resulting SQL queries. It is these changes that then allow us to produce a _much_ more efficient query. To illustrate how bad the old query was, we will use my own snippets as an example. Currently I have 52 snippets, most of which are global ones. To retrieve these, you would run the following Ruby code: user = User.find_by(username: 'yorickpeterse') SnippetsFinder.new(user, author: user).execute On GitLab.com the resulting query will take between 10 and 15 seconds to run, producing the query plan found at https://explain.depesz.com/s/Y5IX. Apart from the long execution time, the total number of buffers (the sum of all shared hits) is around 185 GB, though the real number is probably (hopefully) much lower as I doubt simply summing these numbers produces the true total number of buffers used. The new query's plan can be found at https://explain.depesz.com/s/wHdN, and this query takes between 10 and 100-ish milliseconds to run. The total number of buffers used is only about 30 MB. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/52639
-
- Nov 27, 2017
-
-
Douwe Maan authored
-
- Aug 02, 2017
-
-
Robert Speicher authored
-
- Jul 27, 2017
-
-
Rémy Coutable authored
Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true Signed-off-by:
Rémy Coutable <remy@rymai.me>
-
- May 10, 2017
-
-
Refactor snippets finder & dont return internal snippets for external users See merge request !2094
-
- Apr 30, 2017
-
-
Douwe Maan authored
-
- Mar 21, 2017
-
-
Oswaldo Ferreir authored
-
- Jan 26, 2017
-
-
Robert Speicher authored
-
- Dec 06, 2016
-
-
Rémy Coutable authored
Signed-off-by:
Rémy Coutable <remy@rymai.me>
-
- Dec 02, 2016
-
-
Oswaldo Ferreira authored
-
- Oct 07, 2016
-
-
Nick Thomas authored
This commit adds a number of _html columns and, with the exception of Note, starts updating them whenever the content of their partner fields changes. Note has a collision with the note_html attr_accessor; that will be fixed later A background worker for clearing these cache columns is also introduced - use `rake cache:clear` to set it off. You can clear the database or Redis caches separately by running `rake cache:clear:db` or `rake cache:clear:redis`, respectively.
-
- Sep 19, 2016
-
-
Zeger-Jan van de Weg authored
-
- Jun 22, 2016
-
-
Douglas Barbosa Alexandre authored
-
Douglas Barbosa Alexandre authored
-
- Jun 03, 2016
-
-
James Lopez authored
This reverts commit 3e991230.
-
James Lopez authored
# Conflicts: # app/models/project.rb
-
- Jun 01, 2016
-
-
Yorick Peterse authored
There are several changes to this module: 1. The use of an explicit stack in Participable#participants 2. Proc behaviour has been changed 3. Batch permissions checking == Explicit Stack Participable#participants no longer uses recursion to process "self" and all child objects, instead it uses an Array and processes objects in breadth-first order. This allows us to for example create a single Gitlab::ReferenceExtractor instance and pass this to any Procs. Re-using a ReferenceExtractor removes the need for running potentially many SQL queries every time a Proc is called on a new object. == Proc Behaviour Changed Previously a Proc in Participable was expected to return an Array of User instances. This has been changed and instead it's now expected that a Proc modifies the Gitlab::ReferenceExtractor passed to it. The return value of the Proc is ignored. == Permissions Checking The method Participable#participants uses Ability.users_that_can_read_project to check if the returned users have access to the project of "self" _without_ running multiple SQL queries for every user.
-
- May 09, 2016
-
-
Jeroen van Baarsen authored
In 8278b763 the default behaviour of annotation has changes, which was causing a lot of noise in diffs. We decided in #17382 that it is better to get rid of the whole annotate gem, and instead let people look at schema.rb for the columns in a table. Fixes: #17382
-
- Mar 11, 2016
-
-
Yorick Peterse authored
Previously this used a regular LIKE which is case-sensitive on PostgreSQL. This ensures that for both PostgreSQL and MySQL the searching is case-insensitive similar to searching for projects.
-
- Mar 05, 2016
-
-
Robert Speicher authored
This was removed from the interface in https://github.com/gitlabhq/gitlabhq/pull/6027 but its implementation lingered around for two years.
-
- Dec 09, 2015
-
-
Douwe Maan authored
-
- Jun 19, 2015
-
-
Nicolas Koenig authored
Fixes #2384.
-
- Jun 10, 2015
-
-
Robert Speicher authored
-
- May 26, 2015
-
-
Robert Speicher authored
Snippet model was missing project association
-
Robert Speicher authored
Now there is a single source of information for which attribute a model uses to be referenced, and its special character.
-
- Feb 12, 2015
-
-
Jeroen van Baarsen authored
Signed-off-by:
Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
-
- Oct 09, 2014
-
-
Valery Sizov authored
-
- Jun 26, 2014
-
-
Dmitriy Zaporozhets authored
Signed-off-by:
Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-
- Apr 09, 2014
-
-
Dmitriy Zaporozhets authored
Signed-off-by:
Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-
- Aug 21, 2013
-
-
Dmitriy Zaporozhets authored
-
- Jun 19, 2013
-
-
Dmitriy Zaporozhets authored
-
- Mar 24, 2013
-
-
Andrew8xx8 authored
-
- Jan 22, 2013
-
-
Valeriy Sizov authored
-
- Nov 19, 2012
-
-
Dmitriy Zaporozhets authored
-