Remove un-used data from discussions endpoint
What does this MR do?
Creates a specific serializer entity for the discussions.json
call (DiscussionDiffFileEntity
). Turns out we return quite some unnecessary data (mainly highlighted_diff_lines
and parallel_diff_lines
), which are not used.
This will dramatically reduce the payload size:
- 6mb down to 1.1mb on a large merge request
- Highlighting calls (which consumes considerable memory and CPU will dramatically be reduced as well)
EE MR: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/8736
What are the relevant issue numbers?
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/54288
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
Tests added for this feature/bug -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides -
Link to e2e tests MR added if this MR has Requires e2e tests label. See the Test Planning Process. -
Security reports checked/validated by reviewer
Edited by Oswaldo Ferreira