Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

reduce webpack build time by 55% with this one simple trick #11474

Merged
merged 1 commit into from
Oct 14, 2017

Conversation

cezaraugusto
Copy link
Contributor

This make use of cache option for babel-loader which is huge by itself

close #11473
Auditors: @bsclifton, @evq

tests has a margin of sampling error of plus or minus ~300ms

  • main bundle down from ~2.7s to ~1.3s
  • devtools bundle down from ~1.9s to ~1.5s
  • webtorrent bundle down from ~2.1s to ~0.9s

Verbose:

with cache

    ⚡️   main bundle devtools bundle webtorrent bundle
1st try 13946ms 14816ms 8718ms
2nd try 14840ms 15693ms 9361ms
3rd try 14842ms 15685ms 9830ms

without cache

    💩   main bundle devtools bundle webtorrent bundle
1st try 28841ms 19936ms 22718ms
2nd try 28845ms 18899ms 21738ms
3rd try 26166ms 19773ms 20894ms

Test Plan:

  • Try running npm run watch and look for time hint in webpack stats
  • You should still be able to make changes and they should hot-reaload as usual

@luixxiul
Copy link
Contributor

with this one simple trick

Finally 🏁😄

Copy link
Contributor

@luixxiul luixxiul left a comment

Choose a reason for hiding this comment

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

LGTM :-)

@cezaraugusto cezaraugusto merged commit 5122ab3 into master Oct 14, 2017
@cezaraugusto cezaraugusto modified the milestones: 0.21.x (Developer Channel), 0.22.x (Nightly Channel) Oct 14, 2017
@cezaraugusto cezaraugusto deleted the zz--11437 branch October 14, 2017 15:15
Copy link
Member

@bsclifton bsclifton left a comment

Choose a reason for hiding this comment

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

++ nice find! 😄

@bbondy bbondy modified the milestones: 0.22.x (Developer Channel), 0.23.x (Nightly Channel) Feb 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

reduce webpack build time by caching babel-loader
4 participants