Skip to content

Dont request the stats when tracing diffs

Marc Shaw requested to merge remove_stats_from_tracing_diffs into master

What does this MR do and why?

When we are requesting the diff's for position tracing, we don't need to take into account for the diff stats. At the moment we are making an additional unneeded request for the git stats which we can stop. We also do not request the stats in another location related to position (https://gitlab.com/gitlab-org/gitlab/-/blob/71322bd13a0176c80dc5214551777683670d18be/lib/gitlab/diff/position.rb#L138), but I have added a feature flag nonetheless.

To Test:

  • Turn on the performance bar
  • Ensure feature flag dont_request_stats_for_tracing is off
  • Make a note on a diff
  • Check the performance bar for gitaly calls, and check for diff_stats
  • Turn on feature flag dont_request_stats_for_tracing
  • Make another note on diff
  • Check the performance bar for gitaly calls, and that diff_stats wasn't called

Feature flag off: Screenshot_2023-10-13_at_08.59.58

Feature flag on: Screenshot_2023-10-13_at_09.07.15

Related Issue: #429225 (closed)

Edited by Marc Shaw

Merge request reports