- 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 17 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.
-
Achilleas Pipinellis authored
Fixes automatic URL formatting on Maven Page See merge request gitlab-org/gitlab-ce!22727
-
Sean McGivern authored
-
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
-
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
-
George Tsiolis authored
-
Evan Read authored
-
Evan Read authored
-
Evan Read authored
-
Heinrich Lee Yu authored
-
- 31 Oct, 2018 22 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
-
Yorick Peterse authored
Whitelist none method from ActiveRecord::Querying See merge request gitlab-org/gitlab-ce!22726
-
Filipa Lacerda authored
Prettify remaining files with differences in CE and EE See merge request gitlab-org/gitlab-ce!22702
-
Lyle Kozloff authored
-
Mike Greiling authored
Rename @gitlab-org/gitlab-svgs to @gitlab/svgs See merge request gitlab-org/gitlab-ce!22714
-
Annabel Dunstone Gray authored
Fix quick links button styles Closes #52220 and #52063 See merge request gitlab-org/gitlab-ce!22657
-
Mike Greiling authored
-
Mike Greiling authored
-
Mike Greiling authored
-
Douglas Barbosa Alexandre authored
Prepare Banzai to work with group issuables See merge request gitlab-org/gitlab-ce!22711
-
Douglas Barbosa Alexandre authored
-
Lukas Eipert authored
-
Robert Speicher authored
Build an assets only container See merge request gitlab-org/gitlab-ce!22235
-