Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-08-15 07:50:52 +0300
committerStan Hu <stanhu@gmail.com>2019-08-15 18:02:30 +0300
commit8044440d7ad8c476d05e3e204ee26b9663738cea (patch)
tree66512ad51c75332b6cf52b758c804f582b27d3e5 /spec/controllers
parent4c4bd2c4ee69fa7a0d89aee7749589179c1ef600 (diff)
Eliminate many Gitaly calls in discussions API
Previously, the API to retrieve discussions from merge requests often generated hundreds of Gitaly calls to determine whether a system note should be shown to the user. It did this by: 1. Rendering the Markdown 2. Extracting cross-references from the Markdown 3. For cross-references that were commits, a Gitaly FindCommit RPC would be issued to validate that the commit exists. The last step is unnecessary because we don't need to display a commit if the user doesn't have access to the project in the first place. `RendersNotes#prepare_notes_for_rendering` is already used in `MergeRequestsController`, which is why we don't see N+1 Gitaly calls there. We use it here to optimize the note redaction process. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/65957
Diffstat (limited to 'spec/controllers')
0 files changed, 0 insertions, 0 deletions