MergeRequests::Conflicts::ListService should not hit ListConflictFiles on each call
In the current situation (GitLab 9.5), we get a ridiculously high call rate on ListConflictFiles in production. In the order of 40 req/s.
It's hard to be sure but I strongly suspect the culprit is here: https://gitlab.com/gitlab-org/gitlab-ce/blob/607f63f8a841b601cdc28ca11fcfcc21c76f3e8c/app/services/merge_requests/conflicts/list_service.rb#L13-29
You can see this with puts debugging if you create a MR with conflicts in production and reload the page. This problem is made worse by the fact that on an active MR show browser tab, we reload the merge request via AJAX every 30 seconds.
Edited by Jacob Vosmaer