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

[docs] Fix JS files overloading #31341

Merged
merged 1 commit into from Mar 7, 2022

Conversation

oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari commented Mar 6, 2022

In February 2022, we have used 5.2 TB of data for https://mui.com/. Netlify doesn't provide much analytics, so we can only guess why. Now, I did notice behavior that looks completely wrong. The Next's Link component prefetches all the pages for the page that are in the viewport https://nextjs.org/docs/api-reference/next/link. So this means, loading many pages (100?) when only consuming on. This only happens in production:

Mar-06-2022.18-38-28.mp4

https://mui.com/components/alert/

I would expect (hope) this fix to reduce the bandwidth usage by a good 3 TB, saving $600/month. https://deploy-preview-31341--material-ui.netlify.app/components/alert/

Why did I work on this? Because Netlify started to bill $1,000/month for the bandwidth of Material UI last month. We have discovered this a few days ago. Why did it change? It's not clear to me. @mbrookes Do you remember what was the bandwidth guaranteed by Netlify when we moved from Cloudfront in 2018? I thought it was a couple of TB, not 400 GB.
As side historical data, we were using 357 GB of data 3 years ago. I have sent the support of Netlify a new email.

@oliviertassinari oliviertassinari added docs Improvements or additions to the documentation performance labels Mar 6, 2022
@oliviertassinari oliviertassinari requested a review from a team March 6, 2022 18:02
@mui-bot
Copy link

mui-bot commented Mar 6, 2022

No bundle size changes

Generated by 🚫 dangerJS against dc315a6

Copy link
Member

@siriwatknp siriwatknp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌 Okay, let's see.

@siriwatknp siriwatknp merged commit bee6f0c into mui:master Mar 7, 2022
@oliviertassinari oliviertassinari deleted the docs-fix-overloading branch March 11, 2022 15:21
@oliviertassinari
Copy link
Member Author

oliviertassinari commented May 24, 2022

In May 2022, we are at 3.8 TB of bandwidth usage. The number of unique page views on the docs grew by +21% between these two dates, so the overall impact of this PR is -(1-3.8/(5.2*1.21)) = -39.6%. Not bad 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants