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)
Completed 200 OK in 6297ms (Views: 5998.9ms | ActiveRecord: 36.1ms)
Completed 200 OK in 5213ms (Views: 4913.9ms | ActiveRecord: 37.4ms)
Does this MR meet the acceptance criteria?
- Changelog entry added, if necessary
- Documentation created/updated
- API support added
- Tests added for this feature/bug
- Has been reviewed by Backend
- Conform by the merge request performance guides
- Conform by the style guides
- Squashed related commits together
- Internationalization required/considered
End-to-end tests pass (
package-and-qamanual pipeline job)
What are the relevant issue numbers?
closes #44052 (closed)