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: optimize lighthouse score #218

Closed
wants to merge 17 commits into from
Closed

perf: optimize lighthouse score #218

wants to merge 17 commits into from

Conversation

neo773
Copy link
Contributor

@neo773 neo773 commented Apr 25, 2024

Optimizations:

  • Patched GraphiQL to load fonts via CDN, reducing CSS Bundle size from 525kb to 165kb (-68% reduction)
  • Optimized Lottie animations files reducing payload by another 50%
  • Optimized all PNGs and JPEGs
  • Some accessibility issues

For accessibility I've fixed the 1st party issues rest all are caused by 3rd party like GraphiQL

Report for /playground
image

Report for /
image

/claim #216
/claim #217

fixes #216
fixes #217

@neo773 neo773 changed the title Optimize lighthouse score perf: optimize lighthouse score Apr 25, 2024
@neo773
Copy link
Contributor Author

neo773 commented Apr 27, 2024

@amitksingh1490
Fixed!

@amitksingh1490
Copy link
Contributor

@neo773 can you deploy this change on https://neo773.github.io/tailcallhq.github.io/. want to check the lighthouse score now

@amitksingh1490
Copy link
Contributor

@neo773 Screenshot @tusharmath shared in the issue was for mobile audit and you have shared it for desktop audit.
Last deployed changes on https://neo773.github.io/tailcallhq.github.io/playground/
is not close to 100% on both the pages
image
image

@raikasdev
Copy link

Google's pagespeed is a more realistic Lighthouse run being not affected by eg. extensions: https://pagespeed.web.dev/analysis/https-neo773-github-io-tailcallhq-github-io/50w4z55rwq?form_factor=mobile

image

@neo773
Copy link
Contributor Author

neo773 commented May 2, 2024

@raikasdev

Sorry, I have to disagree on this one.
Lighthouse is actually more accurate here, as PageSpeed is flagging issues that are out of my control, such as "Reduce JavaScript execution time." This includes the Lottie animation library, which alone adds 320.0 kB to the bundle.

Lighthouse's diagnostic is also inaccurate as it's doing CSS coverage for home page and excluding Docusaurus content.
image

image

@neo773
Copy link
Contributor Author

neo773 commented May 2, 2024

Also I pushed a change that adds avif images

@raikasdev
Copy link

Pagespeed is Lighthouse, but it just runs on Google's servers. That's the environment the search engine cares for, if the goal here is to get better SEO and load times.

Lighthouse's diagnostic is also inaccurate as it's doing CSS coverage for home page and excluding Docusaurus content.

It's not inaccurate. It means that there is useless CSS rules loaded on the home page that are only on Docusaurus content pages.

@neo773 neo773 closed this May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants