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:
We should investigate how we can improve the performance of that method in our Rails app.
How to reproduce
- Open
gitlab-shellrepo in your GDK - Open a merge request there with an id
7, which has 170+ files changed - Open a flamegraph for the overview page of that MR using performance bar
