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

Review overall performances #206

Open
willdurand opened this issue May 11, 2021 · 6 comments
Open

Review overall performances #206

willdurand opened this issue May 11, 2021 · 6 comments

Comments

@willdurand
Copy link
Member

willdurand commented May 11, 2021

This blog is statically generated, hosted on s3 "website" with caching configured, and there is a nginx proxy in front, which has its own cache as well.

We don't have a lot of css and js, although some css is borrowed from addons-frontend and it isn't optimized.

I did some tests and there is no major issue on -dev/-stage. Once we have realistic content, we should do a quick perf audit to see if this project needs some tweaks.

@diox said we could look at the fonts. We can probably make sure we're using a fairly small font given that content is en-US only. Inter should provide such a font (latin?).

Optimizing the css coming from addons-frontend is already captured in a separate issue.

┆Issue is synchronized with this Jira Task

@diox
Copy link
Member

diox commented May 11, 2021

We should be able to re-use our entire font logic from the frontend: use a subset + fallback with different unicode-range and proper ordering set, optionally preloading the subset if we feel displaying text as early as possible is worth it.

@diox
Copy link
Member

diox commented May 11, 2021

Note: for the font strategy in particular, we would need to adjust the weights because of mozilla/addons#14160

@diox
Copy link
Member

diox commented Jun 10, 2021

Main takeways:

  • We are loading too many fonts and they are too big. As pointed out above we should re-use a similar strategy we used on the frontend.
  • We should preconnect to https://mozamo.wpengine.com/ or, even better, find a way for it to be served by our CDN under an existing AMO CDN domain (leveraging HTTP/2)
  • We should ensure user uploaded images are optimized

@willdurand
Copy link
Member Author

Thanks!

We are loading too many fonts and they are too big. As pointed out above we should re-use a similar strategy we used on the frontend.

Could you help with that? The blog is en-US only so I suppose we could have a very optimized font? Should we recreate one for the blog or simply reuse the one we have on addons-frontend? Could you help here?

We should preconnect to mozamo.wpengine.com

With a link tag or a header?

or, even better, find a way for it to be served by our CDN under an existing AMO CDN domain (leveraging HTTP/2)

We could, potentially, but that will depend on the long-term strategy I believe.

One idea I had was to crawl the content we fetch on WP, download the assets, rewrite the URLs (we do this already for some) at build time, so that we can push everything to S3. OTOH that's a recipe for disaster so maybe we can come up with something else.

We should ensure user uploaded images are optimized

I thought WP would do it to be honest. If not, I think we'll have to tell Editorial about it.

@willdurand
Copy link
Member Author

Could you help with that? The blog is en-US only so I suppose we could have a very optimized font? Should we recreate one for the blog or simply reuse the one we have on addons-frontend? Could you help here?

Fonts have been updated to fix #245, so we're good here now.

The two remaining items are:

  1. preconnect to wpengine
  2. optimize user-uploaded images

@willdurand
Copy link
Member Author

preconnect to wpengine

If we implement mozilla/addons#9562, we won't need this.

@willdurand willdurand self-assigned this Jun 16, 2021
@willdurand willdurand added this to the 2021.06.24 milestone Jun 16, 2021
@willdurand willdurand modified the milestones: 2021.06.24, 2021.07.15 Jun 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants