Skip to content

Fix N+1 SQL regression in exporting issues to CSV

Stan Hu requested to merge sh-fix-export-csv-service-nplusone into master

!50449 (merged) refactored ExportCsvService to support both issues and requirements. However, it introduced an N+1 SQL query when loading labels of the list of issues that significantly slowed down exporting of many issues.

We bring back the memoization for labels inside the Issues::ExportCsvService to avoid this.

Closes #321622 (closed)

Edited by Stan Hu

Merge request reports