Excess RewritePackageJson trees observed
See original GitHub issueWhen building a large app, with many nested addons we have observed excess RewritePackageJSON tree’s.
Observed in the wild, rather than 9,933 broccoli nodes, we see in excess of 87,000 nodes.
This appears to severely impact build performance.
I believe, the fix may be that v2Trees
creation of it’s new RewritePackageJson
to go through throughTreeCache
if possible.
It may also be the case, that the entire result of v2Tree
should in some circumstances go through the cache as well.
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (9 by maintainers)
Top Results From Across the Web
Problem with package.json? · Issue #2524 - GitHub
Steps to reproduce: Run NPM install from path that package.json is located. Expected behavior: Everything should install smoothly. Observed ...
Read more >But what the hell is package-lock.json?
In projectclone1 I have same package.json and package-lock.json as the original project (which means I did not change anything manually) and ...
Read more >npm - NPM5, What is the difference of package-lock.json with ...
Describe a single representation of a dependency tree such that teammates, deployments, and continuous integration are guaranteed to install ...
Read more >How to Upgrade Dependencies in Your package.json
The Powerful Solution. As we have observed, npm update will not upgrade to the latest major version. It makes sense since major releases...
Read more >Modules: Packages | Node.js v19.3.0 Documentation
A package is a folder tree described by a package.json file. The package consists of the folder containing the package.json file and all...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Starting on this…
Sigh. Yes, ember-cli’s super-linear build costs as the number of addons grows strikes again.
I know @stefanpenner knows this already, but for interested readers: ember-cli doesn’t just build each addon, it builds each addon for each time that addon is consumed by another package (meaning the app or another addon). This causes build costs to grow super-linearly as you add more addons and they depend on each other. Embroider’s compat layer faithfully reproduces this expensive behavior because it has to. Whereas our new V2-formatted addons skip all that and build costs grow linearly in the number of addons, rather than super-linearly.
I agree, we can run the whole
v2Tree
throughthroughTreeCache
, making a new embroider-specific category for it that won’t collide with any existing category.This would be a good PR for you or someone on your team, because you should be able to see an immediate performance impact in that giant app.