Skip to content

Reduce SQL query counts in IssueReferenceFilter

yorickpeterse-staging requested to merge banzai-issue-filter-queries into master

What does this MR do?

This MR adds a preparation phase for reference filters that allows them to prepare/create data structures used while iterating over HTML nodes. In this particular case the preparation phase is used for issue references to greatly cut down the amount of queries executed to get projects/issues for Markdown references.

Are there points in the code the reviewer needs to double check?

No.

Why was this MR needed?

Rendering Markdown containing issue references would run at most two queries for every issue reference: one to get the project and one to get the issue from said project. When rendering Markdown with lots of issue references this would result in a lot of queries being executed.

What are the relevant issue numbers?

#18042 (closed)

Merge request reports