-
Notifications
You must be signed in to change notification settings - Fork 925
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
fix(performance): reduce number of npm install instances #1726
Conversation
❌ Build bit 1.0.7032 failed (commit 0afab98779 by @imsnif) |
Hey @davidfirst & @GiladShoham - this is ready for review now. I added support for components containing dependencies. This mainly involved addressing a few issues:
Please let me know if I missed anything or if you'd like anything changed. :) |
❌ Build bit 1.0.7063 failed (commit 754b727b74 by @imsnif) |
@imsnif , great work with the re-use! :) Regarding # 3) I'm not sure it'll work for all cases. e.g. when configuring the |
@davidfirst - cool, thanks for the review! I also thought about the symlinks issue, but didn't have a concrete example in mind. I don't think we have a really big IO issue here, so maybe just delete it if it's there? Do you think that's a good default behaviour? |
❌ Build bit 1.0.7068 failed (commit 0111079a80 by @imsnif) |
…ion upon isolating process unless the version is not defined
❌ Build bit 1.0.7074 failed (commit 6de5504bed by @davidfirst) |
@imsnif , I fixed the e2e failing tests of "publishComponent unable to find the following file". In the past, we tried this strategy when importing components and ended up checking whether it uses NPM >= 5. This is the PR: #1358 it might help you. Once fixed, it'd be great if you could test it on NPM < 5, NPM > 5 and Yarn. It won't be easy to write e2e-tests for all these versions :( Tree output when Npm is v3.10.10.
|
❌ Build bit 1.0.7201 failed (commit 9d669e99dd by @imsnif) |
❌ Build bit 1.0.7203 failed (commit 9a2b7fe95b by @imsnif) |
…eded since the upgrade of npm version
…got deleted during the link generation process (such as when custom-resolve-modules are involved)
…ch throws an error (see #1746 for more details
❌ Build bit 1.0.7218 failed (commit 4189842b94 by @davidfirst) |
❌ Build bit 1.0.7227 failed (commit a2c85efb2a by @GiladShoham) |
❌ Build bit 1.0.7228 failed (commit 92e8ca9882 by @GiladShoham) |
✅ Build bit 1.0.7238 completed (commit ee99bd58c9 by @davidfirst) |
❌ Build bit 1.0.7240 failed (commit 3393a7bcd3 by @davidfirst) |
Before this PR, when isolating environments we would run an instance of
npm install
once per component. When we have several components as dependencies, this could become quite costly (dozens of instances ofnpm
running at the same time).This process is not needed because when isolating components we do not need the devDependencies.
This reduces isolation time significantly (times here are for packages already cached by npm):
Before:
After:
This change is