- 05 Nov, 2018 1 commit
-
-
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
-
- 01 Nov, 2018 29 commits
-
-
Yorick Peterse authored
This adds a database migration that ensures that project_features.snippets_access_level defaults to a value of 20 (= ProjectFeature::ENABLED), instead of NULL. This allows us to simplify some of the queries used for obtaining snippets, as we no longer need to handle cases where this column is NULL.
-
Sean McGivern authored
CE upstream - 2018-11-01 11:21 UTC See merge request gitlab-org/gitlab-ee!8181
-
Lin Jen-Shin authored
-
Shinya Maeda authored
-
GitLab Bot authored
# Conflicts: # db/schema.rb # doc/api/issues.md # doc/api/merge_requests.md [ci skip]
-
Achilleas Pipinellis authored
Fixes automatic URL formatting on Maven Page See merge request gitlab-org/gitlab-ce!22727
-
Sean McGivern authored
-
Sean McGivern authored
EE port of 44012-filter-reactions-none-any See merge request gitlab-org/gitlab-ee!8175
-
Achilleas Pipinellis authored
Improve markdown and fix links that don't render correctly See merge request gitlab-org/gitlab-ce!22735
-
Achilleas Pipinellis authored
Improve markdown and fix links that don't render correctly See merge request gitlab-org/gitlab-ce!22737
-
Achilleas Pipinellis authored
Improve markdown and fix links that don't render correctly See merge request gitlab-org/gitlab-ce!22738
-
Sean McGivern authored
Resolve "Filter by `None`/`Any` for milestone in issues/mrs API" Closes #52382 See merge request gitlab-org/gitlab-ce!22637
-
Marcia Ramos authored
Refactor SSH keys docs for Windows clients Closes #46398 and #46399 See merge request gitlab-org/gitlab-ce!21004
-
Dmitriy Zaporozhets authored
CE upstream - 2018-11-01 06:21 UTC See merge request gitlab-org/gitlab-ee!8177
-
Achilleas Pipinellis authored
Fix typos in comments and specs See merge request gitlab-org/gitlab-ce!22683
-
Sean McGivern authored
Reduce SQL queries needed to load open merge requests See merge request gitlab-org/gitlab-ce!22709
-
Achilleas Pipinellis authored
-
Andreas Brandl authored
Drop gcp_clusters table See merge request gitlab-org/gitlab-ce!22713
-
Heinrich Lee Yu authored
-
George Tsiolis authored
-
Dmitriy Zaporozhets authored
Signed-off-by:
Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-
GitLab Bot authored
# Conflicts: # app/services/search/group_service.rb [ci skip]
-
🤖 GitLab Bot 🤖 authored
CE upstream - 2018-10-31 21:21 UTC See merge request gitlab-org/gitlab-ee!8172
-
Evan Read authored
-
Evan Read authored
-
Evan Read authored
-
Evan Read authored
Making hashed storage a requirement of Geo Closes #8053 See merge request gitlab-org/gitlab-ee!8133
-
Rachel Nienaber authored
-
Heinrich Lee Yu authored
-
- 31 Oct, 2018 10 commits
-
-
Heinrich Lee Yu authored
-
Heinrich Lee Yu authored
-
Heinrich Lee Yu authored
-
Heinrich Lee Yu authored
-
Heinrich Lee Yu authored
-
Heinrich Lee Yu authored
-
Heinrich Lee Yu authored
-
Heinrich Lee Yu authored
-
Heinrich Lee Yu authored
-
Heinrich Lee Yu authored
-