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

Blog post for v2.8 #1055

Merged
merged 5 commits into from Nov 9, 2022
Merged

Blog post for v2.8 #1055

merged 5 commits into from Nov 9, 2022

Conversation

devongovett
Copy link
Member

No description provided.

@vercel
Copy link

vercel bot commented Nov 5, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
website ✅ Ready (Inspect) Visit Preview Nov 9, 2022 at 5:58AM (UTC)

@devongovett devongovett changed the title Draft blog post for v2.8 Blog post for v2.8 Nov 5, 2022

The team at Atlassian has contributed a new bundling algorithm that solves these problems, significantly improving both build time and runtime performance. It takes a different approach than the previous implementation: rather than initially placing all assets into bundles based on manual code split points (e.g. dynamic import) and then removing duplication afterward, it starts with a graph containing no duplication (each asset is in only one bundle) and then combines bundles as needed to meet constraints like parallel request limits and minimum bundle size requirements. It also reduces time complexity by pre-computing more information and removing nested graph traversals.

This results in both smaller bundles and much faster builds. For a very large project, overall build time was reduced from over 25 minutes to 9 minutes (**2.7x faster**). The total bundle size for the whole project went from 952 MB to 370 MB (**2.5x smaller**).
Copy link
Member Author

Choose a reason for hiding this comment

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

@AGawrys I'd like to give some estimate of the size of the project. Do you have a count of the number of assets/bundles that I could share?

Also, any comparison with the webpack build time (if favorable 😉)?

Copy link
Contributor

Choose a reason for hiding this comment

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

I can get you some of the current numbers tomorrow, though that won't be the same as when we first implemented the change (so the relative improvement might not be accurate).


Parcel now rewrites dependencies to point to their final destinations, following all re-exports found along the way. This means re-exports now have no effect on code splitting, and only used exports within each bundle are loaded. In many applications, this means the entry bundle will become much smaller since more code will only be loaded when needed.

Results will depend on how many re-exports you rely on and your code splitting setup, but we have seen impressive results in several applications so far. One very large app saw over **40% smaller JS entry bundles**, while another saw a 25% smaller JS entry and 50% smaller CSS.
Copy link
Member Author

Choose a reason for hiding this comment

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

40% was the latest number I found on parcel-bundler/parcel#8432 (comment) but lmk if there is an updated one @AGawrys @marcins

src/blog/v2-8-0/v2-8-0.md Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants