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

Cache resolved paths of dependencies #1309

Merged
merged 5 commits into from
May 6, 2018
Merged

Cache resolved paths of dependencies #1309

merged 5 commits into from
May 6, 2018

Conversation

devongovett
Copy link
Member

This adds the resolved path of every dependency to the cache, and uses that when available so we don't need to run the resolver for subsequent builds. This speeds up cached builds on large projects tremendously. For example, on my work project, cached build times went from ~14s to ~4s.

This builds on #1304 since we don't want to store the entire package.json in the cache for every dependency. Since package.json is also listed as a dependency of each asset, when package.json changes the cache will be invalidated since the resolution of that file might also change.

@codecov-io
Copy link

codecov-io commented May 6, 2018

Codecov Report

Merging #1309 into cleanup will increase coverage by 1.29%.
The diff coverage is 71.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           cleanup   #1309      +/-   ##
==========================================
+ Coverage     87.6%   88.9%   +1.29%     
==========================================
  Files           80      80              
  Lines         4567    4551      -16     
==========================================
+ Hits          4001    4046      +45     
+ Misses         566     505      -61
Impacted Files Coverage Δ
src/Bundler.js 93.64% <71.42%> (-0.21%) ⬇️
src/assets/PugAsset.js 88.57% <0%> (-11.43%) ⬇️
src/assets/ReasonAsset.js 92.3% <0%> (-7.7%) ⬇️
src/assets/LESSAsset.js 89.79% <0%> (-4.09%) ⬇️
src/Logger.js 95.78% <0%> (-1.06%) ⬇️
src/transforms/babel.js 96.29% <0%> (+1.38%) ⬆️
src/assets/HTMLAsset.js 89.1% <0%> (+1.98%) ⬆️
src/assets/TypeScriptAsset.js 100% <0%> (+2.7%) ⬆️
src/assets/VueAsset.js 86.66% <0%> (+6.66%) ⬆️
src/visitors/dependencies.js 95.72% <0%> (+6.83%) ⬆️
... and 5 more

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 eb63e24...2380f5c. Read the comment docs.

@devongovett devongovett changed the base branch from cleanup to master May 6, 2018 19:17
@devongovett devongovett merged commit adeee42 into master May 6, 2018
@devongovett devongovett deleted the cache-resolve branch May 6, 2018 19:18
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.

2 participants