Skip to content

Lazily load performance bar request details

Heinrich Lee Yu requested to merge hly-performance-bar-lazy into master

What does this MR do and why?

This prevents fetching of performance bar data of AJAX requests until you switch to the specific request.

In my local environment, when opening a page that makes lots of requests (like the issue show page), Puma workers are saturated due to the numerous /-/peek/results requests.

This also makes the browser Network tab much cleaner so it's easier to find things.

This MR also removes the warning indicator in the request selector because it can be misleading when the requests are lazy loaded. For example, it could say "1 request with warnings" but actually it means "1 known request with warnings" because other request may or may not have warnings.

How to set up and validate locally

  1. Enable performance bar with the p b keyboard shortcut. (It's enabled by default in development)
  2. Open an issue page
  3. Check that /-/peek/results requests are only made when switching to the request in the request switcher dropdown (top-right).
  4. Also verify that navigating back to a request that was already loaded does not trigger another request.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Heinrich Lee Yu

Merge request reports