Preload commits markdown cache for CommitsController
What does this MR do and why?
Follow up for !35314 (merged)
Problem
We trigger n+1 requests to Redis for each commit on the page.
Solution
Use the #with_markdown_cache method to avoid unnecessary requests.
Screenshots or screen recordings
Before | After |
---|---|
How to set up and validate locally
- Visit http://127.0.0.1:3000/gitlab-org/gitlab-test/-/commits/master
- Check Redis link on performance tab
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Vasilii Iakliushin