<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/gitlab/gitlab-ce.git, branch groups-controller-show-performance</title>
<subtitle>gitlab.com: gitlab-org/gitlab-ce.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/'/>
<entry>
<title>Add GroupsController#show performance changelog</title>
<updated>2018-05-28T11:52:41+00:00</updated>
<author>
<name>Yorick Peterse</name>
<email>yorickpeterse@gmail.com</email>
</author>
<published>2018-05-25T11:39:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=50555a9b8cae7d1b702b0bd62bd93b8c4e3e4d59'/>
<id>50555a9b8cae7d1b702b0bd62bd93b8c4e3e4d59</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Added partial index for merge requests</title>
<updated>2018-05-28T11:52:41+00:00</updated>
<author>
<name>Yorick Peterse</name>
<email>yorickpeterse@gmail.com</email>
</author>
<published>2018-05-24T13:34:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=709dd237601f3f7e30a3c8949e2f5c045af77f9c'/>
<id>709dd237601f3f7e30a3c8949e2f5c045af77f9c</id>
<content type='text'>
This index is added on `(target_project_id, iid)` and has a `WHERE state
= 'opened'` condition. Using this index we can drastically improve the
performance of the query used to count the total number of merge
requests in a group. Without this index the query would eventually
perform the following:

    -&gt;  Index Scan using index_merge_requests_on_target_project_id_and_iid on merge_requests  (cost=0.43..4.89 rows=7 width=4) (actual time=0.058..0.353 rows=6 loops=228)
          Index Cond: (target_project_id = projects.id)
          Filter: ((state)::text = 'opened'::text)
          Rows Removed by Filter: 141
          Buffers: shared hit=34351 dirtied=1

Out of the ~180 milliseconds the entire query would take, around 170
milliseconds was spent in just this segment. With the index in place,
the above segment is turned into the following:

    -&gt;  Index Only Scan using yorick_test on merge_requests  (cost=0.42..0.55 rows=7 width=4) (actual time=0.004..0.010 rows=6 loops=228)
          Index Cond: (target_project_id = projects.id)
          Heap Fetches: 419
          Buffers: shared hit=1381

The index also reduces the total query time to roughly 10 milliseconds.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This index is added on `(target_project_id, iid)` and has a `WHERE state
= 'opened'` condition. Using this index we can drastically improve the
performance of the query used to count the total number of merge
requests in a group. Without this index the query would eventually
perform the following:

    -&gt;  Index Scan using index_merge_requests_on_target_project_id_and_iid on merge_requests  (cost=0.43..4.89 rows=7 width=4) (actual time=0.058..0.353 rows=6 loops=228)
          Index Cond: (target_project_id = projects.id)
          Filter: ((state)::text = 'opened'::text)
          Rows Removed by Filter: 141
          Buffers: shared hit=34351 dirtied=1

Out of the ~180 milliseconds the entire query would take, around 170
milliseconds was spent in just this segment. With the index in place,
the above segment is turned into the following:

    -&gt;  Index Only Scan using yorick_test on merge_requests  (cost=0.42..0.55 rows=7 width=4) (actual time=0.004..0.010 rows=6 loops=228)
          Index Cond: (target_project_id = projects.id)
          Heap Fetches: 419
          Buffers: shared hit=1381

The index also reduces the total query time to roughly 10 milliseconds.
</pre>
</div>
</content>
</entry>
<entry>
<title>Reduce queries in GroupProjectsFinder</title>
<updated>2018-05-28T11:52:37+00:00</updated>
<author>
<name>Yorick Peterse</name>
<email>yorickpeterse@gmail.com</email>
</author>
<published>2018-05-17T14:02:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=77d4546eda74d58e32a3f49aaa9935d6b8d1e526'/>
<id>77d4546eda74d58e32a3f49aaa9935d6b8d1e526</id>
<content type='text'>
GroupProjectsFinder#collection_with_user would run the following code:

    if group.users.include?(current_user)

When running this code for multiple groups this would result in one
query being executed for every group.

This commit simple removes the entire "if" statement with the code of
the "else" statement. This ensures both paths use the same code, and
removes the need for explicitly checking if a user is a member of the
group.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
GroupProjectsFinder#collection_with_user would run the following code:

    if group.users.include?(current_user)

When running this code for multiple groups this would result in one
query being executed for every group.

This commit simple removes the entire "if" statement with the code of
the "else" statement. This ensures both paths use the same code, and
removes the need for explicitly checking if a user is a member of the
group.
</pre>
</div>
</content>
</entry>
<entry>
<title>Eager load project routes for issue references</title>
<updated>2018-05-28T11:38:20+00:00</updated>
<author>
<name>Yorick Peterse</name>
<email>yorickpeterse@gmail.com</email>
</author>
<published>2018-05-15T12:47:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=954968c684d12a58b265c9e3796faddc84edd400'/>
<id>954968c684d12a58b265c9e3796faddc84edd400</id>
<content type='text'>
This reduces the number of queries necessary when displaying the
activity page of a group.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reduces the number of queries necessary when displaying the
activity page of a group.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'sh-fix-admin-page-counts-take-2' into 'master'</title>
<updated>2018-05-28T10:36:26+00:00</updated>
<author>
<name>Yorick Peterse</name>
<email>yorickpeterse@gmail.com</email>
</author>
<published>2018-05-28T10:36:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=265b1fafe64ae9fe8a3e92d83c1678b47533ba86'/>
<id>265b1fafe64ae9fe8a3e92d83c1678b47533ba86</id>
<content type='text'>
Fix fast admin counters not working when PostgreSQL has secondaries

Closes #46742

See merge request gitlab-org/gitlab-ce!19154</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix fast admin counters not working when PostgreSQL has secondaries

Closes #46742

See merge request gitlab-org/gitlab-ce!19154</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'gitaly-backup-restore-delete-repositories' into 'master'</title>
<updated>2018-05-28T09:58:14+00:00</updated>
<author>
<name>Douwe Maan</name>
<email>douwe@gitlab.com</email>
</author>
<published>2018-05-28T09:58:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=3ab3838346ec6437bbd655417f021f8f0e7a9855'/>
<id>3ab3838346ec6437bbd655417f021f8f0e7a9855</id>
<content type='text'>
Use Gitaly's DeleteAllRepositories RPC during backup restore

Closes gitaly#1194

See merge request gitlab-org/gitlab-ce!19086</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use Gitaly's DeleteAllRepositories RPC during backup restore

Closes gitaly#1194

See merge request gitlab-org/gitlab-ce!19086</pre>
</div>
</content>
</entry>
<entry>
<title>Use Gitaly's DeleteAllRepositories RPC during backup restore</title>
<updated>2018-05-28T09:58:14+00:00</updated>
<author>
<name>Jacob Vosmaer (GitLab)</name>
<email>jacob@gitlab.com</email>
</author>
<published>2018-05-28T09:58:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=b529d04b69c5fd8612bfa614a536d02574cb7f07'/>
<id>b529d04b69c5fd8612bfa614a536d02574cb7f07</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'bvl-add-username-to-terms-message' into 'master'</title>
<updated>2018-05-28T09:53:58+00:00</updated>
<author>
<name>Douwe Maan</name>
<email>douwe@gitlab.com</email>
</author>
<published>2018-05-28T09:53:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=a45b9fc96ca568b19fd9d09a8b40846c2c8b5b36'/>
<id>a45b9fc96ca568b19fd9d09a8b40846c2c8b5b36</id>
<content type='text'>
Add username to terms message in git and API calls

Closes #46649

See merge request gitlab-org/gitlab-ce!19126</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add username to terms message in git and API calls

Closes #46649

See merge request gitlab-org/gitlab-ce!19126</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch '46846-update-redis-namespace-to-1-6-0' into 'master'</title>
<updated>2018-05-28T09:53:09+00:00</updated>
<author>
<name>Rémy Coutable</name>
<email>remy@rymai.me</email>
</author>
<published>2018-05-28T09:53:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=5f5fc69dde0d7098b72b047090c8a4f56d495002'/>
<id>5f5fc69dde0d7098b72b047090c8a4f56d495002</id>
<content type='text'>
Update redis-namespace to 1.6.0

Closes #46846

See merge request gitlab-org/gitlab-ce!19166</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Update redis-namespace to 1.6.0

Closes #46846

See merge request gitlab-org/gitlab-ce!19166</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch '45190-create-notes-diff-files' into 'master'</title>
<updated>2018-05-28T09:47:06+00:00</updated>
<author>
<name>Douwe Maan</name>
<email>douwe@gitlab.com</email>
</author>
<published>2018-05-28T09:47:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=0a43b25c20010b3eb4c9ab8cef8712df99702fac'/>
<id>0a43b25c20010b3eb4c9ab8cef8712df99702fac</id>
<content type='text'>
Persist and use truncated note diffs instead requesting Gitaly in a N+1 manner on MR page

Closes #45190

See merge request gitlab-org/gitlab-ce!18991</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Persist and use truncated note diffs instead requesting Gitaly in a N+1 manner on MR page

Closes #45190

See merge request gitlab-org/gitlab-ce!18991</pre>
</div>
</content>
</entry>
</feed>
