-
Notifications
You must be signed in to change notification settings - Fork 29.1k
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
src: move package_json_reader cache to c++ #50322
Closed
Closed
Conversation
This file contains 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
Review requested:
|
nodejs-github-bot
added
c++
Issues and PRs that require attention from people who are familiar with C++.
lib / src
Issues and PRs related to general changes in the lib or src directory.
needs-ci
PRs that need a full CI run.
labels
Oct 21, 2023
anonrig
force-pushed
the
package-json-cache
branch
8 times, most recently
from
October 22, 2023 00:34
e462554
to
ba0be9b
Compare
anonrig
force-pushed
the
package-json-cache
branch
4 times, most recently
from
October 23, 2023 19:16
5158e35
to
2690c64
Compare
joyeecheung
reviewed
Oct 24, 2023
anonrig
force-pushed
the
package-json-cache
branch
12 times, most recently
from
October 25, 2023 19:31
2bfbcdb
to
8309e95
Compare
RafaelGSS
added
the
semver-minor
PRs that contain new features and should be released in the next minor version.
label
Dec 15, 2023
Applying
semver-minor
|
RafaelGSS
added a commit
that referenced
this pull request
Dec 15, 2023
Notable changes: deps: * (SEMVER-MINOR) add simdjson (Yagiz Nizipli) #50322 doc: * deprecate hash constructor (Marco Ippolito) #51077 * deprecate `dirent.path` (Antoine du Hamel) #51020 module: * merge config with `package_json_reader` (Yagiz Nizipli) #50322 src: * move package resolver to c++ (Yagiz Nizipli) #50322 PR-URL: TBD
Merged
RafaelGSS
added a commit
that referenced
this pull request
Dec 15, 2023
Notable changes: deps: * (SEMVER-MINOR) add simdjson (Yagiz Nizipli) #50322 doc: * deprecate hash constructor (Marco Ippolito) #51077 * deprecate `dirent.path` (Antoine du Hamel) #51020 module: * merge config with `package_json_reader` (Yagiz Nizipli) #50322 src: * move package resolver to c++ (Yagiz Nizipli) #50322 PR-URL: #51166
RafaelGSS
added a commit
that referenced
this pull request
Dec 15, 2023
Notable changes: deps: * (SEMVER-MINOR) add simdjson (Yagiz Nizipli) #50322 doc: * deprecate hash constructor (Marco Ippolito) #51077 * deprecate `dirent.path` (Antoine du Hamel) #51020 module: * merge config with `package_json_reader` (Yagiz Nizipli) #50322 src: * move package resolver to c++ (Yagiz Nizipli) #50322 PR-URL: #51166
RafaelGSS
added a commit
that referenced
this pull request
Dec 19, 2023
Notable changes: deps: * (SEMVER-MINOR) add simdjson (Yagiz Nizipli) #50322 doc: * deprecate hash constructor (Marco Ippolito) #51077 * deprecate `dirent.path` (Antoine du Hamel) #51020 module: * merge config with `package_json_reader` (Yagiz Nizipli) #50322 src: * move package resolver to c++ (Yagiz Nizipli) #50322 PR-URL: #51166
marco-ippolito
added
the
backport-requested-v20.x
PRs awaiting manual backport to the v20.x-staging branch.
label
Apr 29, 2024
@anonrig I would like to land this on v20 but its not landing cleanly, can you backport? |
This was referenced May 1, 2024
marco-ippolito
added
backport-requested-v20.x
PRs awaiting manual backport to the v20.x-staging branch.
and removed
backport-requested-v20.x
PRs awaiting manual backport to the v20.x-staging branch.
labels
May 1, 2024
marco-ippolito
removed
the
baking-for-lts
PRs that need to wait before landing in a LTS release.
label
Jun 17, 2024
4 tasks
This was referenced Jun 17, 2024
anonrig
added a commit
to anonrig/node
that referenced
this pull request
Jun 18, 2024
Backport-PR-URL: nodejs#50322 PR-URL: nodejs#50322 Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
anonrig
added a commit
to anonrig/node
that referenced
this pull request
Jun 18, 2024
Co-authored-by: Daniel Lemire <daniel@lemire.me> Backport-PR-URL: nodejs#50322 PR-URL: nodejs#50322 Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> # Conflicts: # lib/internal/modules/package_json_reader.js # src/node_file.cc # test/parallel/test-module-binding.js
anonrig
added a commit
to anonrig/node
that referenced
this pull request
Jun 18, 2024
PR-URL: nodejs#50322 Backport-PR-URL: nodejs#50322 Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
marco-ippolito
added
backport-open-v20.x
Indicate that the PR has an open backport
and removed
backport-requested-v20.x
PRs awaiting manual backport to the v20.x-staging branch.
labels
Jun 19, 2024
anonrig
added a commit
to anonrig/node
that referenced
this pull request
Jun 27, 2024
Backport-PR-URL: nodejs#50322 PR-URL: nodejs#50322 Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
anonrig
added a commit
to anonrig/node
that referenced
this pull request
Jun 27, 2024
Co-authored-by: Daniel Lemire <daniel@lemire.me> Backport-PR-URL: nodejs#50322 PR-URL: nodejs#50322 Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> # Conflicts: # lib/internal/modules/package_json_reader.js # src/node_file.cc # test/parallel/test-module-binding.js
anonrig
added a commit
to anonrig/node
that referenced
this pull request
Jun 27, 2024
PR-URL: nodejs#50322 Backport-PR-URL: nodejs#50322 Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
anonrig
added a commit
to anonrig/node
that referenced
this pull request
Jun 27, 2024
PR-URL: nodejs#50322 Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
anonrig
added a commit
to anonrig/node
that referenced
this pull request
Jun 27, 2024
Co-authored-by: Daniel Lemire <daniel@lemire.me> PR-URL: nodejs#50322 Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> # Conflicts: # lib/internal/modules/package_json_reader.js # src/node_file.cc # test/parallel/test-module-binding.js
anonrig
added a commit
to anonrig/node
that referenced
this pull request
Jun 27, 2024
PR-URL: nodejs#50322 Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport-open-v20.x
Indicate that the PR has an open backport
c++
Issues and PRs that require attention from people who are familiar with C++.
commit-queue-rebase
Add this label to allow the Commit Queue to land a PR in several commits.
lib / src
Issues and PRs related to general changes in the lib or src directory.
needs-ci
PRs that need a full CI run.
notable-change
PRs with changes that should be highlighted in changelogs.
semver-minor
PRs that contain new features and should be released in the next minor version.
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.
Co-authored by @lemire
Local Benchmark
My local benchmarks says that running
vite --version
is 5% fasterTODOs
node_modules.cc
node_modules.cc
snapshottablegetPackageScopeConfig
frompackage_config.js
to C++ side, and cache it onnode_modules.cc
Caveats
ERR_INVALID_PACKAGE_CONFIG
does not include JSON.Parse() error message anymore. This mainly because we're usingsimdjson
to avoid JS allocation while parsing for performance reasons.ERR_INVALID_PACKAGE_CONFIG
instead of returning an invalid value.Benchmarks