Preload inline blame data
What does this MR do and why?
Preloads blame data when hovering on the Blame button to improve the perceived performance of this feature.
How Preloading Works
-
Hover on Blame button → triggers
v-gl-hover-load
directive -
Event bubbles up →
@preload-blame
event reaches the blob viewer component -
preloadBlame
prop becomestrue
→ triggers the watcher in the appropriate viewer - GraphQL query executes → fetches blame data in background
- User clicks Blame → data is already available (or in flight), faster display
References
Screenshots or screen recordings
Before | After |
---|---|
Blame data takes a while to load after click | Blame data available faster after click |
![]() |
![]() |
How to set up and validate locally
- Enable the
inline_blame
feature flag - Open a file containing source code
- Hover over the blame button and observe the network request make upon hover
- Click the Blame button, the blame data should load faster than before
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Jacques Erasmus