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

Rework externals for perf #176

Merged
merged 1 commit into from Dec 19, 2018
Merged

Rework externals for perf #176

merged 1 commit into from Dec 19, 2018

Conversation

guybedford
Copy link
Contributor

It turns out one of the expensive parts of the build was this function (easy to see by just commenting out the externals and comparing build speeds).

This reimplements the same logic using some custom optimizations.

The other thing implemented here is to move the .ts and .tsx checks in the resolver to the end. This does mean that test.js will take precedence over test.ts, but the benefit is that the Webpack resolver doesn't have to stat every single that is ever required in the tree as its .ts variation first (which it was doing for EVERYTHING in node_modules...)

Combined these shave about 5 seconds off a 40 second build for me.

@codecov-io
Copy link

Codecov Report

Merging #176 into master will increase coverage by 0.73%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #176      +/-   ##
==========================================
+ Coverage   77.29%   78.03%   +0.73%     
==========================================
  Files          11       11              
  Lines         511      519       +8     
==========================================
+ Hits          395      405      +10     
+ Misses        116      114       -2
Impacted Files Coverage Δ
src/index.js 95.95% <100%> (+2.48%) ⬆️
src/utils/get-package-base.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6aa2c4c...3373fa7. Read the comment docs.

@rauchg rauchg merged commit 132bda3 into master Dec 19, 2018
@rauchg rauchg deleted the externalperf branch December 19, 2018 21:44
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