fix(perf): lazy load un-common dependencies for npm run#87
Merged
fix(perf): lazy load un-common dependencies for npm run#87
Conversation
Contributor
|
We need to be 100% sure this code path isn't hit when running |
Contributor
|
|
Contributor
|
Additionally, thinking of potential future problems. We are moving in the direction of doing fewer normalizations, not more. So the likelihood of us adding either of those steps during install is very low. |
Contributor
|
Eventually |
wraithgar
approved these changes
Apr 7, 2024
Merged
wraithgar
pushed a commit
that referenced
this pull request
Apr 9, 2024
🤖 I have created a release *beep* *boop* --- ## [5.0.1](v5.0.0...v5.0.1) (2024-04-07) ### Bug Fixes * [`fda5722`](fda5722) [#87](#87) perf: lazy load un-common dependencies for npm run (#87) (@H4ad) * [`71f09d6`](71f09d6) [#88](#88) perf: only import necessary functions from semver (#88) (@H4ad) ### Documentation * [`6ebb3c9`](6ebb3c9) [#85](#85) readme: fix broken badge URL (#85) (@10xLaCroixDrinker) ### Chores * [`66e0c23`](66e0c23) [#80](#80) postinstall for dependabot template-oss PR (@lukekarrys) * [`00e4bbb`](00e4bbb) [#80](#80) bump @npmcli/template-oss from 4.21.1 to 4.21.3 (@dependabot[bot]) * [`d784aa8`](d784aa8) [#77](#77) postinstall for dependabot template-oss PR (@lukekarrys) * [`efeee22`](efeee22) [#77](#77) bump @npmcli/template-oss from 4.19.0 to 4.21.1 (@dependabot[bot]) * [`a4df4cf`](a4df4cf) [#56](#56) bump read-package-json from 6.0.4 to 7.0.0 (@dependabot[bot]) * [`f7c048a`](f7c048a) [#58](#58) postinstall for dependabot template-oss PR (@lukekarrys) * [`6240313`](6240313) [#58](#58) bump @npmcli/template-oss from 4.18.1 to 4.19.0 (@dependabot[bot]) * [`5ab117c`](5ab117c) [#57](#57) postinstall for dependabot template-oss PR (@lukekarrys) * [`f56390e`](f56390e) [#57](#57) bump @npmcli/template-oss from 4.18.0 to 4.18.1 (@dependabot[bot]) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I know we avoid lazy loading but I think this case is worthy:
Before:
$ hyperfine --warmup 3 "node ./bin/npm-cli.js run empty" Benchmark 1: node ./bin/npm-cli.js run empty Time (mean ± σ): 197.3 ms ± 3.5 ms [User: 183.1 ms, System: 51.9 ms] Range (min … max): 193.2 ms … 207.5 ms 15 runsAfter:
$ hyperfine --warmup 3 "node ./bin/npm-cli.js run empty" Benchmark 1: node ./bin/npm-cli.js run empty Time (mean ± σ): 184.6 ms ± 2.3 ms [User: 170.1 ms, System: 51.1 ms] Range (min … max): 181.6 ms … 190.5 ms 16 runs