Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(navbar): don't eagerly load console icons #1968

Merged

Conversation

wescopeland
Copy link
Member

@wescopeland wescopeland commented Oct 30, 2023

Currently, the site is eagerly loading all console icons from the navbar, even if the user never opens the "Games" pane in the navbar.

On mobile with 4G conditions, this eager loading results in a ~1s longer overall page load time across the entire site due to hitting the browser's maximum connections limit. Render-blocking resources downstream are being delayed because of the max connections occupancy. The waterfall can be seen here: https://www.webpagetest.org/video/compare.php?tests=231030_BiDc3Y_EH4-r:3-c:0-e:filmstrip

After this PR, the icons will only load when the user opens the menu (or sees them elsewhere on the page).

Screenshot 2023-10-30 at 6 48 15 PM

@wescopeland wescopeland requested a review from a team October 30, 2023 22:49
@wescopeland wescopeland merged commit 00686ef into RetroAchievements:master Oct 31, 2023
5 checks passed
@wescopeland wescopeland deleted the lazy-menu-console-icons branch October 31, 2023 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants