Skip to content

Lazy loading of Usage Quotas tabs content

What does this MR do and why?

Previously we loaded data for all tabs right when user opened Usage Quotas page.

This MR makes loading part of the data for those tabs to be lazy.

It will speed up initial tab content load and reduce load on the server. Which might help with #386442 (closed)

There's no penalty on initial tab content load (speed should be the same as w/o this change), but if user switches to another tab — loading data for that tab will happen only at that time. So particularly "switching" might be slower.

Screenshots or screen recordings

Here's a screen recording with dev tools network inspection:

Screen_Recording_2023-04-10_at_19.06.16

How to set up and validate locally

Open a namespace Usage Quotas page, with default tab (/groups/gitlab-instance-3d22f6d0/-/usage_quotas) and a preselected tab (/groups/gitlab-instance-3d22f6d0/-/usage_quotas#storage-quota-tab) URLs, and then try switching to other tabs.

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 Kos Palchyk

Merge request reports