Reduce N+1 Gitaly queries when publishing multiple draft notes
We are currently calling `Discussions::CaptureDiffNotePositionService` for each draft note being published and results to N+1 Gitaly queries. This is because we create an instance of that service in `Notes::CreateService` for each draft note being published and that service is being called in that service. In this fix, we are adding the capability to skip that call so we can call it within the `DraftNotes::PublishService` instead and only use a single instance of that service. Changelog: performance
Showing
Please register or sign in to comment