Only load dashboard groups asynchronously
When we render https://gitlab.com/dashboard/groups we perform an expensive backend query to determine if groups exist. If there are groups we perform an async fetch to pull the first page of groups to render. Effectively performing the same query twice before rendering a group list.
It makes better sense to replace the initial @groups.empty?
with handling of an empty async result set. In doing so we will halve the time to page render completion.
Engineering implementation plan
- Remove app/views/dashboard/groups/index.html.haml#L10
- Create a new empty state in
app/assets/javascripts/groups/components/empty_states
- Pass empty state component to
empty-state
slot in app/assets/javascripts/groups/index.js#L116
Edited by Alex Pooley