FormidableLabs / FormidableLabs/nextjs-sanity-fe

New font loading causing slower performance

Open
#96 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
31
Forks
5
PR merge metrics
No merged PRs in 30d

Description

Ran a lighthouse audit on the site and saw this:
image

It appears the introduction of the new font was done in a way that introduces a bottleneck before DOM rendering can be completed. It's the second thing to load when looking at the network tab, and it then causes subsequent loads later on of the actual woff2 files

image

image

https://web.dev/render-blocking-resources/?utm_source=lighthouse&utm_medium=devtools

Ideally, we would mark this script as `async` or `defer`, so that it doesn't block rendering of the page. Or, self-host the font in the `_next/static` folder so it's faster to retrieve.

I don't fully understand the usage of this script / api, so I could be wrong, but it should probably be looked into at some point if Lighthouse is flagging it.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.