An error occurred fetching the project authors.
- 23 May, 2018 3 commits
-
-
Grzegorz Bizon authored
Conflicts: app/controllers/projects/pipelines_controller.rb
-
Grzegorz Bizon authored
This makes it possible to avoid N+1 queries when loading pipelines table.
-
Grzegorz Bizon authored
Conflicts: app/controllers/projects/pipelines_controller.rb app/models/ci/pipeline.rb
-
- 17 May, 2018 2 commits
-
-
Yorick Peterse authored
When displaying a project's pipelines (Projects::PipelinesController#index) we now exclude the coverage data. This data was not used by the frontend, yet getting it would require one SQL query per pipeline. These queries in turn could be quite expensive on GitLab.com.
-
Yorick Peterse authored
When displaying the project pipelines dashboard we display a few tabs for different pipeline states. For every such tab we count the number of pipelines that belong to it. For large projects such as GitLab CE this means having to count over 80 000 rows, which can easily take between 70 and 100 milliseconds per query. To improve this we apply a technique we already use for search results: we limit the number of rows to count. The current limit is 1000, which means that if more than 1000 rows are present for a state we will show "1000+" instead of the exact number. The SQL queries used for this perform much better than a regular COUNT, even when a project has a lot of pipelines. Prior to these changes we would end up running a query like this: SELECT COUNT(*) FROM ci_pipelines WHERE project_id = 13083 AND status IN ('success', 'failed', 'canceled') This would produce a plan along the lines of the following: Aggregate (cost=3147.55..3147.56 rows=1 width=8) (actual time=501.413..501.413 rows=1 loops=1) Buffers: shared hit=17116 read=861 dirtied=2 -> Index Only Scan using index_ci_pipelines_on_project_id_and_ref_and_status_and_id on ci_pipelines (cost=0.56..2984.14 rows=65364 width=0) (actual time=0.095..490.263 rows=80388 loops=1) Index Cond: (project_id = 13083) Filter: ((status)::text = ANY ('{success,failed,canceled}'::text[])) Rows Removed by Filter: 2894 Heap Fetches: 353 Buffers: shared hit=17116 read=861 dirtied=2 Planning time: 1.409 ms Execution time: 501.519 ms Using the LIMIT count technique we instead run the following query: SELECT COUNT(*) FROM ( SELECT 1 FROM ci_pipelines WHERE project_id = 13083 AND status IN ('success', 'failed', 'canceled') LIMIT 1001 ) for_count This query produces the following plan: Aggregate (cost=58.77..58.78 rows=1 width=8) (actual time=1.726..1.727 rows=1 loops=1) Buffers: shared hit=169 read=15 -> Limit (cost=0.56..46.25 rows=1001 width=4) (actual time=0.164..1.570 rows=1001 loops=1) Buffers: shared hit=169 read=15 -> Index Only Scan using index_ci_pipelines_on_project_id_and_ref_and_status_and_id on ci_pipelines (cost=0.56..2984.14 rows=65364 width=4) (actual time=0.162..1.426 rows=1001 loops=1) Index Cond: (project_id = 13083) Filter: ((status)::text = ANY ('{success,failed,canceled}'::text[])) Rows Removed by Filter: 9 Heap Fetches: 10 Buffers: shared hit=169 read=15 Planning time: 1.832 ms Execution time: 1.821 ms While this query still uses a Filter for the "status" field the number of rows that it may end up filtering (at most 1001) is small enough that an additional index does not appear to be necessary at this time. See https://gitlab.com/gitlab-org/gitlab-ce/issues/43132#note_68659234 for more information.
-
- 02 May, 2018 1 commit
-
-
Matija Čupić authored
-
- 01 May, 2018 1 commit
-
-
Kamil Trzciński authored
-
- 19 Dec, 2017 2 commits
-
-
Zeger-Jan van de Weg authored
Uses `list_commits_by_oid` on the CommitService, to request the needed commits for pipelines. These commits are needed to display the user that created the commit and the commit title. This includes fixes for tests failing that depended on the commit being `nil`. However, now these are batch loaded, this doesn't happen anymore and the commits are an instance of BatchLoader.
-
Zeger-Jan van de Weg authored
Uses `list_commits_by_oid` on the CommitService, to request the needed commits for pipelines. These commits are needed to display the user that created the commit and the commit title. This includes fixes for tests failing that depended on the commit being `nil`. However, now these are batch loaded, this doesn't happen anymore and the commits are an instance of BatchLoader.
-
- 27 Oct, 2017 1 commit
-
-
Zeger-Jan van de Weg authored
Now, when requesting a commit from the Repository model, the results are not cached. This means we're fetching the same commit by oid multiple times during the same request. To prevent us from doing this, we now cache results. Caching is done only based on object id (aka SHA). Given we cache on the Repository model, results are scoped to the associated project, eventhough the change of two repositories having the same oids for different commits is small.
-
- 23 Oct, 2017 1 commit
-
-
Jacopo authored
-
- 20 Oct, 2017 1 commit
-
-
Jacopo authored
-
- 16 Oct, 2017 1 commit
-
-
Zeger-Jan van de Weg authored
Previous efforts were aimed at detecting N + 1 queries, general regressions are hard to find and mitigate.
-
- 03 Oct, 2017 1 commit
-
-
Mike Greiling authored
-
- 02 Aug, 2017 2 commits
-
-
Robert Speicher authored
-
Robert Speicher authored
-
- 01 Aug, 2017 2 commits
-
-
Robert Speicher authored
-
Robert Speicher authored
-
- 18 Jul, 2017 1 commit
-
-
Lin Jen-Shin authored
-
- 04 Jul, 2017 1 commit
-
-
Lin Jen-Shin authored
-
- 13 Jun, 2017 1 commit
-
-
Kamil Trzcinski authored
-
- 09 Jun, 2017 2 commits
-
-
Oswaldo Ferreira authored
-
Oswaldo Ferreira authored
-
- 25 May, 2017 1 commit
-
-
Nick Thomas authored
-
- 17 May, 2017 1 commit
-
-
Z.J. van de Weg authored
The pipeline was quite meagre in both stages and the number of groups. This has been improved. Performance is not yet optimal, but to limit this from sliding further this slippery slope, a hard limit has been set.
-
- 16 May, 2017 2 commits
-
-
Rémy Coutable authored
Signed-off-by:
Rémy Coutable <remy@rymai.me>
-
Rémy Coutable authored
Signed-off-by:
Rémy Coutable <remy@rymai.me>
-
- 06 May, 2017 1 commit
-
-
Zeger-Jan van de Weg authored
-
- 05 May, 2017 1 commit
-
-
Grzegorz Bizon authored
-
- 21 Apr, 2017 1 commit
-
-
Jacopo authored
Removed all the unnecessary include of `WaitForAjax` and `ApiHelpers` in the specs. Removed unnecessary usage of `api:true`
-
- 17 Apr, 2017 1 commit
-
-
Luke "Jared" Bennett authored
-
- 13 Apr, 2017 1 commit
-
-
Luke "Jared" Bennett authored
-
- 23 Mar, 2017 6 commits
-
-
Shinya Maeda authored
Use detailed_status effectively. Remove unnecesarry context(nest). Add new context in merge_requests_controller_spec.rb and fix a bug. Correct description of spec.
-
Shinya Maeda authored
-
Shinya Maeda authored
-
Shinya Maeda authored
-
Shinya Maeda authored
-
Shinya Maeda authored
-
- 23 Feb, 2017 2 commits
-
-
Douwe Maan authored
-
Filipa Lacerda authored
-