web3.storage icon indicating copy to clipboard operation
web3.storage copied to clipboard

[research] Website perf should be excellent!

Open olizilla opened this issue 4 years ago • 12 comments

Review performance of web3 storage site (explore, measure, propose iterative improvements).

Original Request

Some things to investigate:

  • Why is magic-sdk pulling in 3MB of resources from https://assets.auth.magic.link across 19 requests
  • We need to trim down the 3MB of tailwind css.
  • #61
  • https://github.com/web3-storage/web3.storage/issues/195
  • Logging in using Github takes a very long time with little feedback.

olizilla avatar Jul 15 '21 13:07 olizilla

Requests to assets.auth.magic.link on staging Screenshot 2021-07-15 at 14 56 23

Requests to assets.auth.magic.link on nft.storage Screenshot 2021-07-15 at 14 51 32

olizilla avatar Jul 15 '21 13:07 olizilla

@jdiogopeixoto can you get the css-purge / tailwind optimiser working on the website build to trim down that 3MB css bundle please.

olizilla avatar Jul 15 '21 14:07 olizilla

@olizilla added purge to the #97

jdiogopeixoto avatar Jul 16 '21 16:07 jdiogopeixoto

I can't see any documentation for reducing those requests from magic 😭

alanshaw avatar Jul 23 '21 09:07 alanshaw

Why is magic-sdk pulling in 3MB of resources from https://assets.auth.magic.link/ across 19 requests

I don't think we have any control over this because it's an external provider. On slightly optimistic news, it looks like the amount of transferred data is only around 740kb after gzip does it's thing.

Logging in using Github takes a very long time with little feedback.

I think this is just a problem in OAuth land. It currently takes about 7 seconds which is a little slower than average. That said, I think there were some recent improvements here.

We need to trim down the 3MB of tailwind css.

I think João fixed this already. I'm now only showing 57kb of CSS for web3.storage.

drewdelano avatar Jun 16 '22 21:06 drewdelano

@drewdelano Continue perf review of site. As you find any areas of concern, let's ticket separately (using this ticket as the research tracking ticket we can close once review is done).

JeffLowe avatar Jun 17 '22 13:06 JeffLowe

I continued to look, but everything seems to be working well now as far as I can tell

drewdelano avatar Jun 17 '22 23:06 drewdelano

Please back this up with metrics. Let's track our lighthouse score, or any similar prefered measure that we can record in CI and ensure that we don't introduce regressions and work towards improving.

olizilla avatar Jun 18 '22 17:06 olizilla

that we can record in CI and ensure that we don't introduce regressions and work towards improving.

@olizilla Does this ticket include adding this to the CI pipeline or just taking a baseline?

drewdelano avatar Jun 21 '22 16:06 drewdelano

This ticket is a provocation to make our web perf excellent, and keep it excellent. It was deliberately open ended so that whoever picks it up gets to figure out a neat way of making that happen. Suggestions welcome!

In geneal, please approact all these issues with a "how can I leave this better than I found it?". Round trip times on a fully async team can be really slow. You can avoid getting blocked by making proposals and PRs to make the project better! They gonna be welcomed! Even if we need to change direction, they push the conversation forward more quickly.

olizilla avatar Jun 23 '22 09:06 olizilla

FYI large performance concern related to rendering discovered and getting corrected in #1953 That will have a significant impact on performance across the site.

JeffLowe avatar Sep 30 '22 18:09 JeffLowe