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

chore(v2): upgrade dependencies #4148

Merged
merged 4 commits into from
Feb 2, 2021
Merged

chore(v2): upgrade dependencies #4148

merged 4 commits into from
Feb 2, 2021

Conversation

lex111
Copy link
Contributor

@lex111 lex111 commented Feb 1, 2021

Motivation

Another big upgrading of our deps.
There is a slight decrease in all website bundles from 5.18 MB to 5.15 MB.

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Starting dev server and building website works correctly (tested with this script)

Related PRs

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)

@lex111 lex111 added the pr: maintenance This PR does not produce any behavior differences to end users when upgrading. label Feb 1, 2021
@lex111 lex111 requested a review from slorber as a code owner February 1, 2021 17:25
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Feb 1, 2021
@netlify
Copy link

netlify bot commented Feb 1, 2021

[V1] Deploy preview success

Built with commit d8c8ba1

https://deploy-preview-4148--docusaurus-1.netlify.app

@netlify
Copy link

netlify bot commented Feb 1, 2021

Deploy preview for docusaurus-2 ready!

Built with commit d8c8ba1

https://deploy-preview-4148--docusaurus-2.netlify.app

@lex111
Copy link
Contributor Author

lex111 commented Feb 1, 2021

After the last similar update in #3727, bundles size was 2.34 MB, but now more than 5 MB. Is this because the large docs files were split into multiple files? I see that as a result we have a lot of code duplication, can we somehow fix it?

@github-actions
Copy link

github-actions bot commented Feb 1, 2021

Size Change: 0 B

Total Size: 28.8 kB

ℹ️ View Unchanged
Filename Size Change
website/build/blog/2017/12/14/introducing-docusaurus/index.html 21.7 kB 0 B
website/build/docs/introduction/index.html 180 B 0 B
website/build/index.html 6.92 kB 0 B

compressed-size-action

@github-actions
Copy link

github-actions bot commented Feb 1, 2021

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟠 Performance 84
🟢 Accessibility 99
🟢 Best practices 100
🟢 SEO 100
🟢 PWA 95

Lighthouse ran on https://deploy-preview-4148--docusaurus-2.netlify.app/classic/

@lex111 lex111 force-pushed the lex111/bump-010221 branch from de79012 to 0e6bca9 Compare February 1, 2021 18:10
@lex111 lex111 force-pushed the lex111/bump-010221 branch from 0e6bca9 to d8c8ba1 Compare February 1, 2021 18:11
@slorber
Copy link
Collaborator

slorber commented Feb 2, 2021

After the last similar update in #3727, bundles size was 2.34 MB, but now more than 5 MB.

How do you track that? Inspecting network requests on homepage / docs I don't see a significant increase

@lex111
Copy link
Contributor Author

lex111 commented Feb 2, 2021

With bundle-analyzer, try it yourself by running yarn build --locale en --bundle-analyzer.

@slorber
Copy link
Collaborator

slorber commented Feb 2, 2021

I see, you mean this?

image

I don't think it's a problem, and yes it's likely related to splitting some docs as separate pages instead of having one page.
The more you have pages the more you have small bundles, and the more the total amount of JS increases. Each page has its own little boilerplate, but it does not necessarily increase the size of a given page.

I don't think it's too important to monitor the total amount of JS produced (as long as it remains relatively small) but more important to monitor the size of the main/runtime bundles that are loaded for the whole site.

Not totally satisfied with the tooling we currently have to monitor and detect perf regressions, there's room for improvements here. I think we could add the bundle analyzer by default on deploy previews and maybe also track perf metrics with an external tool (suggested that already but need some validation)

@slorber slorber merged commit d22039c into master Feb 2, 2021
@lex111
Copy link
Contributor Author

lex111 commented Feb 2, 2021

Yes, but I assumed that we would have one bundle with common dependencies. which is shared by other pages, is it possible to do something similar?

@lex111 lex111 deleted the lex111/bump-010221 branch February 2, 2021 14:25
@slorber
Copy link
Collaborator

slorber commented Feb 2, 2021

yes, we have a "main" bundle with shared deps, but it does not prevent more js to be created.

Not sure why it used to be tracked here, but not anymore, will take a look!

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: maintenance This PR does not produce any behavior differences to end users when upgrading.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants