Skip to content

Speed up setting of relative position

Sean McGivern requested to merge speed-up-relative-positioning into master

What does this MR do?

Speeds up a really slow query on the boards issues index. See https://gitlab.com/gitlab-org/gitlab-ce/issues/54276#note_119340977 for more details.

I tried this out on one of the lists from https://gitlab.com/gitlab-org/gitlab-ce/snippets/1781725, using the profiler changes in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/23320.

Before: it timed out. After:

I, [2018-11-23T12:13:28.644218 #22527]  INFO -- : Completed 200 OK in 820ms (Views: 1.3ms | ActiveRecord: 126.5ms | Elasticsearch: 0.0ms)
I, [2018-11-23T12:13:28.651112 #22527]  INFO -- : Issue total (2): 25.9ms
I, [2018-11-23T12:13:28.651314 #22527]  INFO -- : Project total (3): 9.8ms
I, [2018-11-23T12:13:28.651395 #22527]  INFO -- : User total (1): 9.6ms
I, [2018-11-23T12:13:28.651459 #22527]  INFO -- : LabelPriority total (1): 7.8ms
I, [2018-11-23T12:13:28.651517 #22527]  INFO -- : Note total (1): 6.1ms
I, [2018-11-23T12:13:28.651576 #22527]  INFO -- : Board total (2): 3.3ms
I, [2018-11-23T12:13:28.651635 #22527]  INFO -- : Milestone total (1): 3.0ms
I, [2018-11-23T12:13:28.651713 #22527]  INFO -- : Namespace total (1): 2.7ms
I, [2018-11-23T12:13:28.651896 #22527]  INFO -- : Route total (2): 2.7ms
I, [2018-11-23T12:13:28.651959 #22527]  INFO -- : List total (1): 2.2ms
I, [2018-11-23T12:13:28.652042 #22527]  INFO -- : Label total (1): 1.6ms
I, [2018-11-23T12:13:28.652099 #22527]  INFO -- : ProjectFeature total (1): 1.4ms
I, [2018-11-23T12:13:28.652162 #22527]  INFO -- : LabelLink total (1): 1.0ms
I, [2018-11-23T12:13:28.652219 #22527]  INFO -- : IssueAssignee total (1): 1.0ms
I, [2018-11-23T12:13:28.652282 #22527]  INFO -- : Plan total (1): 0.9ms
I, [2018-11-23T12:13:28.652377 #22527]  INFO -- : License total (1): 0.9ms

Does this MR meet the acceptance criteria?

Closes

Merge request reports