Skip to content

Use persisted diff data instead fetching Git on discussions

What does this MR do?

Today, when fetching diffs of a note, we always go to Gitaly in order to diff between commits and return the diff of each discussion note. With this change we avoid doing that for notes on the "current version" of the MR.

Screenshots (if relevant)

In a MR with ~12 comments (2 outdateds)

from:

Completed 200 OK in 6297ms (Views: 5998.9ms | ActiveRecord: 36.1ms)

Screen_Shot_2018-04-30_at_18.28.59

to:

Completed 200 OK in 5213ms (Views: 4913.9ms | ActiveRecord: 37.4ms)

Screen_Shot_2018-04-30_at_18.26.27

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

closes https://gitlab.com/gitlab-org/gitlab-ce/issues/44052

Edited by Oswaldo Ferreira

Merge request reports