-
Notifications
You must be signed in to change notification settings - Fork 469
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
Blog post for v2.8 #1055
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
src/blog/v2-8-0/v2-8-0.md
Outdated
|
||
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**). |
There was a problem hiding this comment.
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 😉)?
There was a problem hiding this comment.
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).
src/blog/v2-8-0/v2-8-0.md
Outdated
|
||
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. |
There was a problem hiding this comment.
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
No description provided.