Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.2k
src: move package_json_reader cache to c++#50322
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
anonrig commented Oct 21, 2023 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
nodejs-github-bot commented Oct 21, 2023
Review requested:
|
e462554 to ba0be9bCompare5158e35 to 2690c64CompareUh oh!
There was an error while loading. Please reload this page.
2bfbcdb to 8309e95ComparePR-URL: nodejs#50322 Reviewed-By: Jacob Smith <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Geoffrey Booth <[email protected]>
Co-authored-by: Daniel Lemire <[email protected]> PR-URL: nodejs#50322 Reviewed-By: Jacob Smith <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Geoffrey Booth <[email protected]>
PR-URL: nodejs#50322 Reviewed-By: Jacob Smith <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Geoffrey Booth <[email protected]>
Co-authored-by: Daniel Lemire <[email protected]> PR-URL: nodejs#50322 Reviewed-By: Jacob Smith <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Geoffrey Booth <[email protected]>
PR-URL: nodejs#50322 Reviewed-By: Jacob Smith <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Geoffrey Booth <[email protected]>
PR-URL: #50322 Backport-PR-URL: #56590 Reviewed-By: Jacob Smith <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Geoffrey Booth <[email protected]>
Co-authored-by: Daniel Lemire <[email protected]> PR-URL: #50322 Backport-PR-URL: #56590 Reviewed-By: Jacob Smith <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Geoffrey Booth <[email protected]>
PR-URL: #50322 Backport-PR-URL: #56590 Reviewed-By: Jacob Smith <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Geoffrey Booth <[email protected]>
Notable changes: crypto: * update root certificates to NSS 3.104 (Richard Lau) #55681 deps: * (SEMVER-MINOR) add simdjson (Yagiz Nizipli) #50322 doc: * add LJHarb to collaborators (Jordan Harband) #56132 * enforce strict policy to semver-major releases (Rafael Gonzaga) #55732 * add jazelly to collaborators (Jason Zhang) #55531 module: * (SEMVER-MINOR) merge config with `package_json_reader` (Yagiz Nizipli) #50322 src: * (SEMVER-MINOR) move package resolver to c++ (Yagiz Nizipli) #50322 tools: * fix root certificate updater (Richard Lau) #55681 PR-URL: #56699
Notable changes: crypto: * update root certificates to NSS 3.104 (Richard Lau) #55681 deps: * (SEMVER-MINOR) add simdjson (Yagiz Nizipli) #50322 doc: * add LJHarb to collaborators (Jordan Harband) #56132 * enforce strict policy to semver-major releases (Rafael Gonzaga) #55732 * add jazelly to collaborators (Jason Zhang) #55531 esm: * mark import attributes and JSON module as stable (Nicolò Ribaudo) #55333 module: * (SEMVER-MINOR) merge config with `package_json_reader` (Yagiz Nizipli) #50322 src: * (SEMVER-MINOR) move package resolver to c++ (Yagiz Nizipli) #50322 tools: * fix root certificate updater (Richard Lau) #55681 PR-URL: #56699
Notable changes: crypto: * update root certificates to NSS 3.104 (Richard Lau) #55681 deps: * (SEMVER-MINOR) add simdjson (Yagiz Nizipli) #50322 doc: * add LJHarb to collaborators (Jordan Harband) #56132 * enforce strict policy to semver-major releases (Rafael Gonzaga) #55732 * add jazelly to collaborators (Jason Zhang) #55531 esm: * mark import attributes and JSON module as stable (Nicolò Ribaudo) #55333 module: * (SEMVER-MINOR) merge config with `package_json_reader` (Yagiz Nizipli) #50322 src: * (SEMVER-MINOR) move package resolver to c++ (Yagiz Nizipli) #50322 tools: * fix root certificate updater (Richard Lau) #55681 PR-URL: #56699
PR-URL: #50322 Backport-PR-URL: #56590 Reviewed-By: Jacob Smith <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Geoffrey Booth <[email protected]>
Co-authored-by: Daniel Lemire <[email protected]> PR-URL: #50322 Backport-PR-URL: #56590 Reviewed-By: Jacob Smith <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Geoffrey Booth <[email protected]>
PR-URL: #50322 Backport-PR-URL: #56590 Reviewed-By: Jacob Smith <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Geoffrey Booth <[email protected]>
PR-URL: nodejs#50322 Backport-PR-URL: nodejs#56590 Reviewed-By: Jacob Smith <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Geoffrey Booth <[email protected]>
Co-authored-by: Daniel Lemire <[email protected]> PR-URL: nodejs#50322 Backport-PR-URL: nodejs#56590 Reviewed-By: Jacob Smith <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Geoffrey Booth <[email protected]>
PR-URL: nodejs#50322 Backport-PR-URL: nodejs#56590 Reviewed-By: Jacob Smith <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Geoffrey Booth <[email protected]>
BridgeAR commented May 2, 2025
@anonrig this seems to cause a major performance regression. I did not look deeper into this but it's causing test code to run about 10x slower when running the following example code: DataDog/dd-trace-js#5360 |
anonrig commented May 2, 2025 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
@BridgeAR Happy to take a look. Can you share a reproduction that doesn't require any external knowledge, and open a new issue and tag me? |
BridgeAR commented May 2, 2025
I can't look into it closer at the moment. Since about 80% of all time is taken in Node.js when running the example, I guess it should be fine to check the source code to cause the problem. I'll open a issue about it though. |
Co-authored by @lemire
Local Benchmark
My local benchmarks says that running
vite --versionis 5% fasterTODOs
node_modules.ccnode_modules.ccsnapshottablegetPackageScopeConfigfrompackage_config.jsto C++ side, and cache it onnode_modules.ccCaveats
ERR_INVALID_PACKAGE_CONFIGdoes not include JSON.Parse() error message anymore. This mainly because we're usingsimdjsonto avoid JS allocation while parsing for performance reasons.ERR_INVALID_PACKAGE_CONFIGinstead of returning an invalid value.Benchmarks