Skip to content

Improve the performance of the MR changes count

Right now changes count (get_diffs_count method) on the MR Overview page can take up to 40% of the total page load time. This has also been confirmed by Patrick (internal).

Example of a flamegraph for the MR Overview page diffs count section:

image

We should investigate how we can improve the performance of that method in our Rails app.

How to reproduce

  1. Open gitlab-shell repo in your GDK
  2. Open a merge request there with an id 7, which has 170+ files changed
  3. Open a flamegraph for the overview page of that MR using performance bar